Bug 791397 - Gimp import multi page PDF only imports first page.

Poppler and poppler-data are now hard dependencies.
PDF is a common-enough format nowadays that import support is likely
considered as a granted feature by everyone. Moreover the current
fallback to the PostScript plug-in for PDF support just gives a degraded
experience with less features (and probably a lot of bugs since
basically nobody uses this code).
Poppler-data is also considered mandatory because non-western language
support should never be considered an "option". People using non-western
languages are not second class citizens and therefore if we say that PDF
import is now a hard feature, it should also include PDF using CJK or
Cyrillic languages.
This commit is contained in:
Jehan 2017-12-13 18:33:22 +01:00
parent c9913bc1e7
commit a207570cfe
3 changed files with 15 additions and 40 deletions

View File

@ -87,17 +87,7 @@ header files installed.
11. You may want to install other third party libraries or programs
that are needed for some of the available plug-ins. We recommend
to check that the following libraries are installed: libjasper,
libpoppler-glib, webkit, libmng, librsvg, libwmf, libaa
and libgs (Ghostscript).
Note that to be able to render CJK (Asian) and Cyrillic characters
in pdf-imported files, the data package `poppler-data` needs to be
installed as well. It is only possible to automatically check its
existence since version @POPPLER_DATA_REQUIRED_VERSION@, but there is no strong requirement
in our `configure` script because older versions of poppler-data may
still work. Thus if poppler-data was not detected during ./configure,
but you are sure it is installed, you are advised to test your build
afterwards.
webkit, libmng, librsvg, libwmf, libaa and libgs (Ghostscript).
12. The Python extension requires Python 2 development headers (@PYTHON2_REQUIRED_VERSION@
or newer) to be present. You will also need PyGTK and the
@ -145,6 +135,8 @@ header files installed.
libtiff
Little CMS @LCMS_REQUIRED_VERSION@
pangocairo @PANGOCAIRO_REQUIRED_VERSION@
libpoppler-glib @POPPLER_REQUIRED_VERSION@
poppler-data @POPPLER_DATA_REQUIRED_VERSION@
zlib
18. Summary of optional packages:
@ -157,8 +149,6 @@ header files installed.
libjasper - JPEG 2000
libmng - MNG
openexr @OPENEXR_REQUIRED_VERSION@ OpenEXR
libpoppler-glib @POPPLER_REQUIRED_VERSION@ PDF import
poppler-data @POPPLER_DATA_REQUIRED_VERSION@ PDF import (optional: rendering of CJK and Cyrillic)
cairo-pdf @CAIRO_PDF_REQUIRED_VERSION@ PDF export
python 2 @PYTHON2_REQUIRED_VERSION@ Python plug-ins
librsvg @RSVG_REQUIRED_VERSION@ SVG
@ -266,9 +256,6 @@ These are:
--without-librsvg. If for some reason you want to build GIMP without
SVG support, you can build --without-librsvg.
--without-poppler. If for some reason you don't want to build the PDF
Import plug-in that uses libpoppler, you can use --without-poppler.
--without-print. If for some reason you don't want to build the Print
plug-in based on the GtkPrint API, you can build with --without-print.

View File

@ -1724,29 +1724,18 @@ AM_CONDITIONAL(BUILD_PRINT, test "x$enable_print" = xyes)
# Check for libpoppler
######################
AC_ARG_WITH(poppler,[ --without-poppler build without poppler support])
have_poppler=no
if test "x$with_poppler" != xno; then
PKG_CHECK_MODULES(POPPLER,
poppler-glib >= poppler_required_version,
[ FILE_PDF_LOAD='file-pdf-load$(EXEEXT)'
AC_DEFINE(HAVE_POPPLER, 1, [Define to 1 if libpoppler is available])
# We don't check against a poppler-data version, because old
# versions may work as well. Yet the pkg-config file has only been
# added in 0.4.7, thus we can't verify presence of older versions.
PKG_CHECK_MODULES(POPPLER_DATA, poppler-data,
[have_poppler="yes (Cyrillic and CJK support: yes)"],
[have_poppler='yes (Cyrillic and CJK support: no or poppler-data < poppler_data_required_version)']
)
],
have_poppler="Using PostScript plug-in (libpoppler-glib not found)")
else
have_poppler="Using PostScript plug-in (libpoppler support disabled)"
fi
AC_SUBST(FILE_PDF_LOAD)
# We don't check against a poppler-data version, which basically means
# at least 0.4.7 since it has a pkg-config file since 0.4.7, thus we
# can't verify presence of older versions. Anyway all modern
# distributions have at least this version and CJK/Cyrillic support
# should not be considered as "second-zone citizen".
PKG_CHECK_MODULES(POPPLER, [poppler-glib >= poppler_required_version],
PKG_CHECK_MODULES(POPPLER_DATA, poppler-data,,
[add_deps_error([poppler-data])]),
[add_deps_error([poppler-glib >= poppler_required_version])])
have_poppler=yes
AC_DEFINE(HAVE_POPPLER, 1, [Define to 1 if libpoppler is available])
#####################
# Check for cairo-pdf
@ -2709,7 +2698,6 @@ Optional Plug-Ins:
MNG: $have_libmng
OpenEXR: $have_openexr
WebP: $have_webp
PDF (import): $have_poppler
PDF (export): $have_cairo_pdf
Print: $enable_print
Python 2: $enable_python

View File

@ -92,7 +92,7 @@ libexec_PROGRAMS = \
$(FILE_MNG) \
file-pat \
file-pcx \
$(FILE_PDF_LOAD) \
file-pdf-load \
$(FILE_PDF_SAVE) \
file-pix \
file-png \