From 1a0f225a72ecc4b93b7681a9bf7e4aa7f06c04fc Mon Sep 17 00:00:00 2001 From: infirit Date: Tue, 9 Dec 2014 12:00:14 +0100 Subject: [pdf] Update to poppler api changes Linearized PopplerDocument property is now boolean rather than string. Based on evince commit: f77e6cf4fd7fef49ac91d8c62b6a9a993529adb8 From: Carlos Garcia Campos --- backend/pdf/ev-poppler.cc | 11 +++++++++++ configure.ac | 1 + 2 files changed, 12 insertions(+) diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index 74c6c48e..f1942687 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -634,6 +634,9 @@ pdf_document_get_info (EvDocument *document) PopplerPermissions permissions; EvPage *page; char *metadata; +#ifdef HAVE_POPPLER_DOCUMENT_IS_LINEARIZED + gboolean linearized; +#endif info = g_new0 (EvDocumentInfo, 1); @@ -670,7 +673,11 @@ pdf_document_get_info (EvDocument *document) "producer", &(info->producer), "creation-date", &(info->creation_date), "mod-date", &(info->modified_date), +#ifdef HAVE_POPPLER_DOCUMENT_IS_LINEARIZED + "linearized", &linearized, +#else "linearized", &(info->linearized), +#endif "metadata", &metadata, NULL); @@ -776,6 +783,10 @@ pdf_document_get_info (EvDocument *document) info->security = g_strdup (_("No")); } +#ifdef HAVE_POPPLER_DOCUMENT_IS_LINEARIZED + info->linearized = linearized ? g_strdup (_("Yes")) : g_strdup (_("No")); +#endif + return info; } diff --git a/configure.ac b/configure.ac index a37ca9b1..871248aa 100644 --- a/configure.ac +++ b/configure.ac @@ -496,6 +496,7 @@ if test "x$enable_pdf" = "xyes"; then AC_CHECK_FUNCS(poppler_page_get_text_layout) AC_CHECK_FUNCS(poppler_page_get_selected_text) AC_CHECK_FUNCS(poppler_page_add_annot) + AC_CHECK_FUNCS(poppler_document_is_linearized) LIBS=$atril_save_LIBS PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, enable_cairo_pdf=yes, enable_cairo_pdf=no) if test x$enable_cairo_pdf = xyes; then -- cgit v1.2.1