From: kramm Date: Wed, 9 May 2007 12:07:48 +0000 (+0000) Subject: added queryable parameters X-Git-Tag: buttons-working~641 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=89d041306bf7d12bb40319e7f36c7e919f09f4c8 added queryable parameters --- diff --git a/lib/pdf/pdf.cc b/lib/pdf/pdf.cc index 7381ca1..3f72d59 100644 --- a/lib/pdf/pdf.cc +++ b/lib/pdf/pdf.cc @@ -235,11 +235,17 @@ char* pdf_doc_getinfo(gfxdocument_t*doc, char*name) else if(!strcmp(name, "creationdate")) return getInfoDate(i->docinfo.getDict(), "CreationDate"); else if(!strcmp(name, "moddate")) return getInfoDate(i->docinfo.getDict(), "ModDate"); else if(!strcmp(name, "linearized")) return strdup(i->doc->isLinearized() ? "yes" : "no"); + else if(!strcmp(name, "tagged")) return strdup(i->doc->getStructTreeRoot()->isDict() ? "yes" : "no"); else if(!strcmp(name, "encrypted")) return strdup(i->doc->isEncrypted() ? "yes" : "no"); else if(!strcmp(name, "oktoprint")) return strdup(i->doc->okToPrint() ? "yes" : "no"); else if(!strcmp(name, "oktocopy")) return strdup(i->doc->okToCopy() ? "yes" : "no"); else if(!strcmp(name, "oktochange")) return strdup(i->doc->okToChange() ? "yes" : "no"); else if(!strcmp(name, "oktoaddnotes")) return strdup(i->doc->okToAddNotes() ? "yes" : "no"); + else if(!strcmp(name, "version")) { + char buf[32]; + sprintf(buf, "%.1f", i->doc->getPDFVersion()); + return strdup(buf); + } return 0; }