X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpdf%2Fpdf.cc;h=3f72d598281743c75131d58f48a58ee78910cd20;hb=6636b0071ea28fe147638b4b8b71f9990800f992;hp=7381ca18bc02e48a4cb9d46fb7e5274d3b95b2fc;hpb=3c334be274efc5f03038dc392c8266235c5ed6d5;p=swftools.git 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; }