1 From f77e6cf4fd7fef49ac91d8c62b6a9a993529adb8 Mon Sep 17 00:00:00 2001
2 From: Carlos Garcia Campos <carlosgc@gnome.org>
3 Date: Fri, 17 Sep 2010 11:21:16 +0000
4 Subject: [pdf] Update to poppler api changes
6 Linearized PopplerDocument property is now boolean rather than string.
8 diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
9 index aa080e6..ced3ef7 100644
10 --- a/backend/pdf/ev-poppler.cc
11 +++ b/backend/pdf/ev-poppler.cc
12 @@ -722,6 +722,9 @@ pdf_document_get_info (EvDocument *document)
13 PopplerPermissions permissions;
16 +#ifdef HAVE_POPPLER_DOCUMENT_IS_LINEARIZED
17 + gboolean linearized;
20 info = g_new0 (EvDocumentInfo, 1);
22 @@ -758,7 +761,11 @@ pdf_document_get_info (EvDocument *document)
23 "producer", &(info->producer),
24 "creation-date", &(info->creation_date),
25 "mod-date", &(info->modified_date),
26 +#ifdef HAVE_POPPLER_DOCUMENT_IS_LINEARIZED
27 + "linearized", &linearized,
29 "linearized", &(info->linearized),
31 "metadata", &metadata,
34 @@ -864,6 +871,10 @@ pdf_document_get_info (EvDocument *document)
35 info->security = g_strdup (_("No"));
38 +#ifdef HAVE_POPPLER_DOCUMENT_IS_LINEARIZED
39 + info->linearized = linearized ? g_strdup (_("Yes")) : g_strdup (_("No"));
45 diff --git a/configure.ac b/configure.ac
46 index 0faa16e..9619349 100644
49 @@ -512,6 +512,7 @@ if test "x$enable_pdf" = "xyes"; then
50 AC_CHECK_FUNCS(poppler_page_get_text_layout)
51 AC_CHECK_FUNCS(poppler_page_get_selected_text)
52 AC_CHECK_FUNCS(poppler_page_add_annot)
53 + AC_CHECK_FUNCS(poppler_document_is_linearized)
54 LIBS=$evince_save_LIBS
55 PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, enable_cairo_pdf=yes, enable_cairo_pdf=no)
56 if test x$enable_cairo_pdf = xyes; then