From: Asbjørn Sloth Tønnesen Date: Mon, 7 Jun 2010 18:43:11 +0000 (+0000) Subject: poppler: use new PDF version methods X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=72b2fb4b532b4339d282db4bb6cd10508d066211 poppler: use new PDF version methods --- diff --git a/lib/pdf/pdf.cc b/lib/pdf/pdf.cc index f148424..f04c396 100644 --- a/lib/pdf/pdf.cc +++ b/lib/pdf/pdf.cc @@ -4,7 +4,12 @@ #include "../gfxsource.h" #include "../devices/rescale.h" #include "../log.h" -#include "config.h" +#include "../../config.h" +#ifdef HAVE_POPPLER + #include +#else + #include "xpdf/config.h" +#endif #include "GlobalParams.h" #include "InfoOutputDev.h" #include "GFXOutputDev.h" @@ -355,7 +360,11 @@ char* pdf_doc_getinfo(gfxdocument_t*doc, const char*name) else if(!strcmp(name, "oktoaddnotes")) return strdup(i->doc->okToAddNotes() ? "yes" : "no"); else if(!strcmp(name, "version")) { char buf[32]; +#ifdef HAVE_POPPLER + sprintf(buf, "%d.%d", i->doc->getPDFMajorVersion(), i->doc->getPDFMinorVersion()); +#else sprintf(buf, "%.1f", i->doc->getPDFVersion()); +#endif return strdup(buf); } return strdup("");