[gnome-commander/gcmd-1-3] Fixed problem #595097 (build error for poppler >= 0.11.3)
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-commander/gcmd-1-3] Fixed problem #595097 (build error for poppler >= 0.11.3)
- Date: Mon, 14 Sep 2009 22:01:14 +0000 (UTC)
commit c8701c2378252528e38164cf4141671b1347b86e
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Mon Sep 14 23:54:09 2009 +0200
Fixed problem #595097 (build error for poppler >= 0.11.3)
configure.in | 3 +++
src/tags/gnome-cmd-tags-poppler.cc | 5 +++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/configure.in b/configure.in
index 056e085..8fec918 100644
--- a/configure.in
+++ b/configure.in
@@ -242,6 +242,9 @@ AC_ARG_WITH(poppler, [ --without-poppler disable PDF support])
have_pdf=no
if test x$with_poppler != xno; then
PKG_CHECK_MODULES(POPPLER, poppler >= $POPPLER_REQ, have_pdf=yes, have_pdf=no)
+ if pkg-config --max-version=0.11.2 poppler; then
+ AC_DEFINE(POPPLER_HAS_GET_PDF_VERSION, 1, [Define to 1 if poppler has support for PDFDoc::getPDFVersion()])
+ fi
fi
if test "x$have_pdf" = "xyes"; then
AC_DEFINE(HAVE_PDF, 1, [Define to 1 if you have PDF support])
diff --git a/src/tags/gnome-cmd-tags-poppler.cc b/src/tags/gnome-cmd-tags-poppler.cc
index 6484ffb..f1b98c9 100644
--- a/src/tags/gnome-cmd-tags-poppler.cc
+++ b/src/tags/gnome-cmd-tags-poppler.cc
@@ -320,7 +320,12 @@ void gcmd_tags_poppler_load_metadata(GnomeCmdFile *f)
f->metadata->mark_as_accessed(TAG_DOC);
+#ifdef POPPLER_HAS_GET_PDF_VERSION
f->metadata->addf(TAG_PDF_VERSION, "%.1f", doc.getPDFVersion());
+#else
+ f->metadata->addf(TAG_PDF_VERSION, "%u.%u", doc.getPDFMajorVersion(), doc.getPDFMinorVersion());
+#endif
+
f->metadata->addf(TAG_DOC_PAGECOUNT, "%i", doc.getNumPages());
f->metadata->addf(TAG_PDF_OPTIMIZED, "%u", doc.isLinearized());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]