diff --git a/.travis.yml b/.travis.yml index d7d39749..2ca5238d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ before_install: - sudo apt-get install libpng12-dev libwebp-dev libtiff4-dev libxml2-dev - sudo apt-get install swig libmagick++-dev bc - sudo apt-get install libcfitsio3-dev libgsl0-dev libmatio-dev - - sudo apt-get install liborc-0.4-dev liblcms2-dev + - sudo apt-get install liborc-0.4-dev liblcms2-dev libpoppler-glib-dev before_script: - ./bootstrap.sh - ./configure diff --git a/configure.ac b/configure.ac index 4ddb37fe..7aecb252 100644 --- a/configure.ac +++ b/configure.ac @@ -563,12 +563,12 @@ AC_ARG_WITH([poppler], AS_HELP_STRING([--without-poppler], [build without poppler (default: test)])) if test x"$with_poppler" != x"no"; then - PKG_CHECK_MODULES(POPPLER, [poppler-glib >= 0.30.0 cairo >= 1.2], - [AC_DEFINE(HAVE_POPPLER,1,[define if you have poppler-glib >= 0.30.0 and cairo >= 1.2 installed.]) + PKG_CHECK_MODULES(POPPLER, [poppler-glib >= 0.16.0 cairo >= 1.2], + [AC_DEFINE(HAVE_POPPLER,1,[define if you have poppler-glib >= 0.16.0 and cairo >= 1.2 installed.]) with_poppler=yes PACKAGES_USED="$PACKAGES_USED poppler-glib cairo" ], - [AC_MSG_WARN([poppler-glib >= 0.30.0 or cairo >= 1.2 not found; disabling PDF load via poppler]) + [AC_MSG_WARN([poppler-glib >= 0.16.0 or cairo >= 1.2 not found; disabling PDF load via poppler]) with_poppler=no ] ) @@ -961,7 +961,7 @@ file import with OpenSlide: $with_openslide (requires openslide-3.3.0 or later) file import with matio: $with_matio PDF import with poppler-glib: $with_poppler - (requires poppler-glib 0.30.0 or later) + (requires poppler-glib 0.16.0 or later) SVG import with librsvg-2.0: $with_rsvg (requires librsvg-2.0 2.40.0 or later) file import with cfitsio: $with_cfitsio diff --git a/test/images/blankpage.pdf b/test/images/blankpage.pdf new file mode 100755 index 00000000..5884469c --- /dev/null +++ b/test/images/blankpage.pdf @@ -0,0 +1,37 @@ +%PDF-1.1 +%âãÏÓ +1 0 obj +<< +/Pages 2 0 R +/Type /Catalog +>> +endobj +2 0 obj +<< +/MediaBox [0 0 595 842] +/Kids [3 0 R] +/Count 1 +/Type /Pages +>> +endobj +3 0 obj +<< +/Parent 2 0 R +/MediaBox [0 0 595 842] +/Type /Page +>> +endobj xref +0 4 +0000000000 65535 f +0000000015 00000 n +0000000066 00000 n +0000000149 00000 n +trailer + +<< +/Root 1 0 R +/Size 4 +>> +startxref +221 +%%EOF diff --git a/test/images/blankpage.png b/test/images/blankpage.png new file mode 100644 index 00000000..00478276 Binary files /dev/null and b/test/images/blankpage.png differ diff --git a/test/test_formats.sh b/test/test_formats.sh index 72af1ad4..bce44af1 100755 --- a/test/test_formats.sh +++ b/test/test_formats.sh @@ -7,6 +7,10 @@ . ./variables.sh +# poppler / pdfload reference image +poppler=$test_images/blankpage.pdf +poppler_ref=$test_images/blankpage.png + # the matlab image and reference image matlab=$test_images/sample.mat matlab_ref=$test_images/sample.png @@ -215,6 +219,10 @@ test_rad $rad test_raw $mono test_raw $image +if test_supported pdfload; then + test_loader $poppler_ref $poppler pdfload +fi + if test_supported matload; then test_loader $matlab_ref $matlab matlab fi