[poppler] Branch 'better_object' - 8 commits - CMakeLists.txt configure.ac cpp/Doxyfile NEWS poppler/CurlCachedFile.h poppler/CurlPDFDocBuilder.h poppler/Makefile.am poppler/PSOutputDev.cc poppler/Stream.cc poppler/StructTreeRoot.cc qt4/src qt5/src utils/pdfseparate.1 utils/pdfseparate.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Mon Jul 31 22:12:20 UTC 2017


 CMakeLists.txt              |    4 ++--
 NEWS                        |   14 ++++++++++++++
 configure.ac                |   34 +++++++++++++++++++++++++++-------
 cpp/Doxyfile                |    2 +-
 poppler/CurlCachedFile.h    |    4 ++--
 poppler/CurlPDFDocBuilder.h |    4 ++--
 poppler/Makefile.am         |    2 +-
 poppler/PSOutputDev.cc      |    2 +-
 poppler/Stream.cc           |    5 ++---
 poppler/StructTreeRoot.cc   |    1 +
 qt4/src/Doxyfile            |    2 +-
 qt5/src/Doxyfile            |    2 +-
 utils/pdfseparate.1         |    7 ++++---
 utils/pdfseparate.cc        |    3 ++-
 14 files changed, 61 insertions(+), 25 deletions(-)

New commits:
commit dbe7a5da3dce56210bd4ca2deaf8f5ad4a9d0529
Merge: 687474e1 c167f35b
Author: Albert Astals Cid <aacid at kde.org>
Date:   Tue Aug 1 00:12:13 2017 +0200

    Merge remote-tracking branch 'origin/master' into better_object

diff --cc poppler/Stream.cc
index 649fbbd0,606902fe..df767652
--- a/poppler/Stream.cc
+++ b/poppler/Stream.cc
@@@ -289,14 -306,14 +288,14 @@@ Stream *Stream::makeFilter(char *name, 
      str = new CCITTFaxStream(str, encoding, endOfLine, byteAlign,
  			     columns, rows, endOfBlock, black);
    } else if (!strcmp(name, "DCTDecode") || !strcmp(name, "DCT")) {
-     colorXform = -1;
+ #if HAVE_DCT_DECODER
+     int colorXform = -1;
      if (params->isDict()) {
 -      if (params->dictLookup("ColorTransform", &obj, recursion)->isInt()) {
 +      obj = params->dictLookup("ColorTransform", recursion);
 +      if (obj.isInt()) {
  	colorXform = obj.getInt();
        }
 -      obj.free();
      }
- #ifdef HAVE_DCT_DECODER
      str = new DCTStream(str, colorXform, dict, recursion);
  #else
      error(errSyntaxError, getPos(), "Unknown filter '{0:s}'", name);
diff --cc poppler/StructTreeRoot.cc
index 5af530e9,b557e3a6..b8c52c64
--- a/poppler/StructTreeRoot.cc
+++ b/poppler/StructTreeRoot.cc
@@@ -6,7 -6,7 +6,8 @@@
  //
  // Copyright 2013, 2014 Igalia S.L.
  // Copyright 2014 Fabio D'Urso <fabiodurso at hotmail.it>
+ // Copyright 2017 Jan-Erik S <janerik234678 at gmail.com>
 +// Copyright 2017 Albert Astals Cid <aacid at kde.org>
  //
  //========================================================================
  
commit c167f35b8c3fd7e94fa97385949b2c133d918ed4
Author: Albert Astals Cid <aacid at kde.org>
Date:   Mon Jul 31 23:39:37 2017 +0200

    Poppler 0.57

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 576b1f9f..390a6b5f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ if (ECM_FOUND)
 endif()
 
 set(POPPLER_MAJOR_VERSION "0")
-set(POPPLER_MINOR_VERSION "56")
+set(POPPLER_MINOR_VERSION "57")
 set(POPPLER_MICRO_VERSION "0")
 set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
 
@@ -539,7 +539,7 @@ add_library(poppler STATIC ${poppler_SRCS})
 else(MSVC)
 add_library(poppler SHARED ${poppler_SRCS})
 endif(MSVC)
-set_target_properties(poppler PROPERTIES VERSION 67.0.0 SOVERSION 67)
+set_target_properties(poppler PROPERTIES VERSION 68.0.0 SOVERSION 68)
 target_link_libraries(poppler LINK_PRIVATE ${poppler_LIBS})
 install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
 
diff --git a/NEWS b/NEWS
index 0ca52ca2..2a8c5374 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,17 @@
+Release 0.57.0
+        core:
+         * Fix parsing of Type 1 fonts with newlines in encoding sequences. Bug #101728
+         * Fix crash in broken documents
+
+        utils:
+         * pdfunite: Fix crash with broken documents. Bug #101208
+         * pdftohtml: skip control characters Bug #101770
+         * pdfseparate: minor improvement to the documentation. Bug #101800
+
+        build system:
+         * cmake: Set RUNPATH for poppler shared libs. Bug #101945
+         * configure: fix --disable-FEATURE actually enabling the feature
+
 Release 0.56.0
         core:
          * FormFieldButton::setState() shouldn't check the field is readOnly
diff --git a/configure.ac b/configure.ac
index 40a78d90..1cf8b296 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 m4_define([poppler_version_major],[0])
-m4_define([poppler_version_minor],[56])
+m4_define([poppler_version_minor],[57])
 m4_define([poppler_version_micro],[0])
 m4_define([poppler_version],[poppler_version_major.poppler_version_minor.poppler_version_micro])
 
diff --git a/cpp/Doxyfile b/cpp/Doxyfile
index 53d14523..73224715 100644
--- a/cpp/Doxyfile
+++ b/cpp/Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME           = "Poppler CPP"
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER         = 0.56.0
+PROJECT_NUMBER         = 0.57.0
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.
diff --git a/poppler/Makefile.am b/poppler/Makefile.am
index 3448c1ed..b2970cb7 100644
--- a/poppler/Makefile.am
+++ b/poppler/Makefile.am
@@ -327,7 +327,7 @@ libpoppler_la_LIBADD =				\
 	$(win32_libs)
 
 libpoppler_la_LDFLAGS =				\
-	-version-info 67:0:0			\
+	-version-info 68:0:0			\
 	@create_shared_lib@			\
 	@auto_import_flags@
 
diff --git a/qt4/src/Doxyfile b/qt4/src/Doxyfile
index b85278d3..1e1503b8 100644
--- a/qt4/src/Doxyfile
+++ b/qt4/src/Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME           = "Poppler Qt4 "
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER         = 0.56.0
+PROJECT_NUMBER         = 0.57.0
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.
diff --git a/qt5/src/Doxyfile b/qt5/src/Doxyfile
index a7f71f40..8d121200 100644
--- a/qt5/src/Doxyfile
+++ b/qt5/src/Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME           = "Poppler Qt5"
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER         = 0.56.0
+PROJECT_NUMBER         = 0.57.0
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.
commit be0384d2220a75d2666b1fd2228e156b1595a57f
Author: Albert Astals Cid <aacid at kde.org>
Date:   Mon Jul 31 23:34:57 2017 +0200

    Add missing (C)

diff --git a/poppler/StructTreeRoot.cc b/poppler/StructTreeRoot.cc
index 29beeecc..b557e3a6 100644
--- a/poppler/StructTreeRoot.cc
+++ b/poppler/StructTreeRoot.cc
@@ -6,6 +6,7 @@
 //
 // Copyright 2013, 2014 Igalia S.L.
 // Copyright 2014 Fabio D'Urso <fabiodurso at hotmail.it>
+// Copyright 2017 Jan-Erik S <janerik234678 at gmail.com>
 //
 //========================================================================
 
commit 0e7f6cb1c42db3d65395365833472ff859def87a
Author: Jannick <thirdedition at gmx.net>
Date:   Mon Jul 31 19:53:12 2017 +0200

    Fix some warnings in some unusual #ifdef combinations
    
    Bug #101812

diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index c7a6057d..0ff0bbb4 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -3284,10 +3284,10 @@ GBool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/,
   int nStripes, stripeH, stripeY;
   int c, w, h, x, y, comp, i;
   int numComps, initialNumComps;
-#endif
   char hexBuf[32*2 + 2];	// 32 values X 2 chars/value + line ending + null
   Guchar digit;
   GBool isGray;
+#endif
 
   if (!postInitDone) {
     postInit();
diff --git a/poppler/Stream.cc b/poppler/Stream.cc
index e3d5cf6a..606902fe 100644
--- a/poppler/Stream.cc
+++ b/poppler/Stream.cc
@@ -221,7 +221,6 @@ Stream *Stream::makeFilter(char *name, Stream *str, Object *params, int recursio
   int encoding;
   GBool endOfLine, byteAlign, endOfBlock, black;
   int columns, rows;
-  int colorXform;
   Object globals, obj;
 
   if (!strcmp(name, "ASCIIHexDecode") || !strcmp(name, "AHx")) {
@@ -307,14 +306,14 @@ Stream *Stream::makeFilter(char *name, Stream *str, Object *params, int recursio
     str = new CCITTFaxStream(str, encoding, endOfLine, byteAlign,
 			     columns, rows, endOfBlock, black);
   } else if (!strcmp(name, "DCTDecode") || !strcmp(name, "DCT")) {
-    colorXform = -1;
+#if HAVE_DCT_DECODER
+    int colorXform = -1;
     if (params->isDict()) {
       if (params->dictLookup("ColorTransform", &obj, recursion)->isInt()) {
 	colorXform = obj.getInt();
       }
       obj.free();
     }
-#ifdef HAVE_DCT_DECODER
     str = new DCTStream(str, colorXform, dict, recursion);
 #else
     error(errSyntaxError, getPos(), "Unknown filter '{0:s}'", name);
commit f55d6a64dd3f69fa9c1ba984218809cc50c9b052
Author: Albert Astals Cid <aacid at kde.org>
Date:   Mon Jul 31 19:45:32 2017 +0200

    Add missing (C)

diff --git a/utils/pdfseparate.cc b/utils/pdfseparate.cc
index 34cc1926..a6f1d5ec 100644
--- a/utils/pdfseparate.cc
+++ b/utils/pdfseparate.cc
@@ -9,6 +9,7 @@
 // Copyright (C) 2013, 2016 Pino Toscano <pino at kde.org>
 // Copyright (C) 2013 Daniel Kahn Gillmor <dkg at fifthhorseman.net>
 // Copyright (C) 2013 Suzuki Toshiya <mpsuzuki at hiroshima-u.ac.jp>
+// Copyright (C) 2017 Léonard Michelet <leonard.michelet at smile.fr>
 //
 //========================================================================
 #include "config.h"
commit 543b0ea219191122fee0583ce62c19e31de34109
Author: Roland Hieber <r.hieber at pengutronix.de>
Date:   Mon Jul 17 11:35:32 2017 +0200

    configure.ac: fix --disable-FEATURE actually enabling the feature
    
    Forwarded: https://bugs.freedesktop.org/show_bug.cgi?id=101818
    
    A frequently seen antipattern is to use
    AC_ARG_ENABLE(feature, help, action-if-given, action-if-not-given) as
    AC_ARG_ENABLE(feature, help, action-if-enabled, action-if-disabled).
    However, action-if-given is also evaluated for --disable-FEATURE (with
    enableval=no), which results in --disable-FEATURE and --enable-FEATURE
    doing the same in this case.
    
    Rewrite the single-precision, fixedpoint and cmyk arguments accordingly
    so the user is not confused if they explicitely want to disable those
    options.
    
    Signed-off-by: Roland Hieber <r.hieber at pengutronix.de>

diff --git a/configure.ac b/configure.ac
index 98d497a9..40a78d90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,16 +122,36 @@ else
 fi
 
 AC_ARG_ENABLE(single-precision,
-[  --enable-single-precision     use single precision arithmetic (instead of double precision) in the Splash backend],
-AC_DEFINE(USE_FLOAT,      [1], [Use single precision arithmetic in the Splash backend]))
+        AC_HELP_STRING([--enable-single-precision],
+                       [use single precision arithmetic (instead of double
+                        precision) in the Splash backend]),
+        enable_single_precision=$enableval,
+        enable_single_precision=no)
+if test x$enable_single_precision != xno; then
+        AC_DEFINE(USE_FLOAT, [1], [Use single precision arithmetic in the Splash backend])
+fi
 
 AC_ARG_ENABLE(fixedpoint,
-[  --enable-fixedpoint     use fixed point (instead of double precision) arithmetic in the Splash backend],
-AC_DEFINE(USE_FIXEDPOINT, [1], [Use fixed point arithmetic in the Splash backend]))
+        AC_HELP_STRING([--enable-fixedpoint],
+                       [use fixed point (instead of double precision) arithmetic
+                        in the Splash backend]),
+        enable_fixedpoint=$enableval,
+        enable_fixedpoint=no)
+if test x$enable_fixedpoint != xno; then
+        if test x$enable_single_precision != xno; then
+                AC_MSG_ERROR([Choose only one of --enable-single-precision or --enable-fixedpoint!])
+        fi
+        AC_DEFINE(USE_FIXEDPOINT, [1], [Use fixed point arithmetic in the Splash backend])
+fi
 
 AC_ARG_ENABLE(cmyk,
-[  --enable-cmyk           Include support for CMYK rasterization],
-AC_DEFINE(SPLASH_CMYK, [1], [Include support for CMYK rasterization]))
+        AC_HELP_STRING([--enable-cmyk],
+                       [Include support for CMYK rasterization]),
+        enable_cmyk=$enableval,
+        enable_cmyk=no)
+if test x$enable_cmyk != xno; then
+        AC_DEFINE(SPLASH_CMYK, [1], [Include support for CMYK rasterization])
+fi
 
 dnl Relocation support
 AC_ARG_ENABLE(relocatable,
commit 92ad743b63c3e82211ea0b2e4d4471dd3f71cebc
Author: Léonard Michelet <leonard.michelet at smile.fr>
Date:   Mon Jul 31 19:40:06 2017 +0200

    pdfseparate: minor improvement to the documentation
    
    Bug #101800

diff --git a/utils/pdfseparate.1 b/utils/pdfseparate.1
index 856f345e..132511a1 100644
--- a/utils/pdfseparate.1
+++ b/utils/pdfseparate.1
@@ -13,10 +13,11 @@ extract single pages from a Portable Document Format (PDF).
 pdfseparate reads the PDF file
 .IR PDF-file ,
 extracts one or more pages, and writes one PDF file for each page to
-.IR PDF-page-pattern ,
+.IR PDF-page-pattern.
+.PP
 PDF-page-pattern should contain
-.BR %d .
-%d is replaced by the page number.
+.BR %d
+(or any variant respecting printf format), since %d is replaced by the page number.
 .TP
 The PDF-file should not be encrypted.
 .SH OPTIONS
diff --git a/utils/pdfseparate.cc b/utils/pdfseparate.cc
index 45274ec8..34cc1926 100644
--- a/utils/pdfseparate.cc
+++ b/utils/pdfseparate.cc
@@ -97,7 +97,7 @@ bool extractPages (const char *srcFileName, const char *destFileName) {
     }
   }
   if (!foundmatch && firstPage != lastPage) {
-    error(errSyntaxError, -1, "'{0:s}' must contain '%d' if more than one page should be extracted", destFileName);
+    error(errSyntaxError, -1, "'{0:s}' must contain '%d' (or any variant respecting printf format) if more than one page should be extracted, in order to print the page number", destFileName);
     free(auxDestFileName);
     delete doc;
     return false;
commit 0a2096743fa749a8a7d4caa714eecbe8a9661619
Author: Albert Astals Cid <aacid at kde.org>
Date:   Mon Jul 31 16:52:46 2017 +0200

    Add some more overrides

diff --git a/poppler/CurlCachedFile.h b/poppler/CurlCachedFile.h
index 49882aba..80e69727 100644
--- a/poppler/CurlCachedFile.h
+++ b/poppler/CurlCachedFile.h
@@ -25,8 +25,8 @@ public:
 
   CurlCachedFileLoader();
   ~CurlCachedFileLoader();
-  size_t init(GooString *url, CachedFile* cachedFile);
-  int load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer);
+  size_t init(GooString *url, CachedFile* cachedFile) override;
+  int load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer) override;
 
 private:
 
diff --git a/poppler/CurlPDFDocBuilder.h b/poppler/CurlPDFDocBuilder.h
index fb348620..43b442db 100644
--- a/poppler/CurlPDFDocBuilder.h
+++ b/poppler/CurlPDFDocBuilder.h
@@ -25,8 +25,8 @@ class CurlPDFDocBuilder : public PDFDocBuilder {
 public:
 
   PDFDoc *buildPDFDoc(const GooString &uri, GooString *ownerPassword = NULL,
-    GooString *userPassword = NULL, void *guiDataA = NULL);
-  GBool supports(const GooString &uri);
+    GooString *userPassword = NULL, void *guiDataA = NULL) override;
+  GBool supports(const GooString &uri) override;
 
 };
 


More information about the poppler mailing list