git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
211a4fe
)
poppler: use new PDF version methods
author
Asbjørn Sloth Tønnesen
<asbjorn@asbjorn.biz>
Mon, 7 Jun 2010 18:43:11 +0000
(18:43 +0000)
committer
Asbjørn Sloth Tønnesen
<asbjorn@asbjorn.biz>
Wed, 16 Jun 2010 14:36:56 +0000
(14:36 +0000)
lib/pdf/pdf.cc
patch
|
blob
|
history
diff --git
a/lib/pdf/pdf.cc
b/lib/pdf/pdf.cc
index
f148424
..
f04c396
100644
(file)
--- 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 "../gfxsource.h"
#include "../devices/rescale.h"
#include "../log.h"
-#include "config.h"
+#include "../../config.h"
+#ifdef HAVE_POPPLER
+ #include <poppler-config.h>
+#else
+ #include "xpdf/config.h"
+#endif
#include "GlobalParams.h"
#include "InfoOutputDev.h"
#include "GFXOutputDev.h"
#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];
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());
sprintf(buf, "%.1f", i->doc->getPDFVersion());
+#endif
return strdup(buf);
}
return strdup("");
return strdup(buf);
}
return strdup("");