typedef struct _pdf_doc_internal
{
int protect;
+ int nocopy;
PDFDoc*doc;
Object docinfo;
InfoOutputDev*info;
if(page < 1 || page > doc->num_pages)
return 0;
+ if(di->nocopy) {
+ msg("<error> PDF disallows copying.");
+ return 0;
+ }
gfxpage_t* pdf_page = (gfxpage_t*)malloc(sizeof(gfxpage_t));
pdf_page_internal_t*pi= (pdf_page_internal_t*)malloc(sizeof(pdf_page_internal_t));
i->protect = 0;
if (i->doc->isEncrypted()) {
if(!i->doc->okToCopy()) {
- printf("PDF disallows copying.\n");
- return 0;
+ i->nocopy = 1;
}
if(!i->doc->okToChange() || !i->doc->okToAddNotes())
i->protect = 1;