texlive[42718] Build/source/libs/poppler: poppler 0.50.0
commits+kakuto at tug.org
commits+kakuto at tug.org
Fri Dec 16 01:40:18 CET 2016
Revision: 42718
http://tug.org/svn/texlive?view=revision&revision=42718
Author: kakuto
Date: 2016-12-16 01:40:18 +0100 (Fri, 16 Dec 2016)
Log Message:
-----------
poppler 0.50.0
Modified Paths:
--------------
trunk/Build/source/libs/poppler/ChangeLog
trunk/Build/source/libs/poppler/configure
trunk/Build/source/libs/poppler/poppler-PATCHES/ChangeLog
trunk/Build/source/libs/poppler/poppler-PATCHES/TL-Changes
trunk/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX
trunk/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions
trunk/Build/source/libs/poppler/poppler-src/CMakeLists.txt
trunk/Build/source/libs/poppler/poppler-src/ChangeLog
trunk/Build/source/libs/poppler/poppler-src/NEWS
trunk/Build/source/libs/poppler/poppler-src/configure.ac
trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.cc
trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.h
trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.cc
trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.h
trunk/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc
trunk/Build/source/libs/poppler/poppler-src/poppler/GfxState.cc
trunk/Build/source/libs/poppler/poppler-src/poppler/Hints.cc
trunk/Build/source/libs/poppler/poppler-src/poppler/Hints.h
trunk/Build/source/libs/poppler/poppler-src/poppler/Makefile.am
trunk/Build/source/libs/poppler/poppler-src/poppler/Outline.cc
trunk/Build/source/libs/poppler/poppler-src/poppler/Outline.h
trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc
trunk/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc
trunk/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.h
trunk/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc
trunk/Build/source/libs/poppler/poppler-src/splash/SplashBitmap.cc
trunk/Build/source/libs/poppler/poppler-src/splash/SplashBitmap.h
trunk/Build/source/libs/poppler/version.ac
Modified: trunk/Build/source/libs/poppler/ChangeLog
===================================================================
--- trunk/Build/source/libs/poppler/ChangeLog 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/ChangeLog 2016-12-16 00:40:18 UTC (rev 42718)
@@ -1,3 +1,8 @@
+2016-12-16 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
+
+ Import poppler-0.50.0.
+ * version.ac: Adjust.
+
2016-11-15 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
Import poppler-0.49.0.
Modified: trunk/Build/source/libs/poppler/configure
===================================================================
--- trunk/Build/source/libs/poppler/configure 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/configure 2016-12-16 00:40:18 UTC (rev 42718)
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for poppler (TeX Live) 0.49.0.
+# Generated by GNU Autoconf 2.69 for poppler (TeX Live) 0.50.0.
#
# Report bugs to <tex-k at tug.org>.
#
@@ -580,8 +580,8 @@
# Identity of this package.
PACKAGE_NAME='poppler (TeX Live)'
PACKAGE_TARNAME='poppler--tex-live-'
-PACKAGE_VERSION='0.49.0'
-PACKAGE_STRING='poppler (TeX Live) 0.49.0'
+PACKAGE_VERSION='0.50.0'
+PACKAGE_STRING='poppler (TeX Live) 0.50.0'
PACKAGE_BUGREPORT='tex-k at tug.org'
PACKAGE_URL=''
@@ -1306,7 +1306,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures poppler (TeX Live) 0.49.0 to adapt to many kinds of systems.
+\`configure' configures poppler (TeX Live) 0.50.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1373,7 +1373,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of poppler (TeX Live) 0.49.0:";;
+ short | recursive ) echo "Configuration of poppler (TeX Live) 0.50.0:";;
esac
cat <<\_ACEOF
@@ -1486,7 +1486,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-poppler (TeX Live) configure 0.49.0
+poppler (TeX Live) configure 0.50.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2076,7 +2076,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by poppler (TeX Live) $as_me 0.49.0, which was
+It was created by poppler (TeX Live) $as_me 0.50.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3999,7 +3999,7 @@
# Define the identity of the package.
PACKAGE='poppler--tex-live-'
- VERSION='0.49.0'
+ VERSION='0.50.0'
# Some tools Automake needs.
@@ -6578,7 +6578,7 @@
cat >>confdefs.h <<_ACEOF
-#define POPPLER_VERSION "0.49.0"
+#define POPPLER_VERSION "0.50.0"
_ACEOF
@@ -7272,7 +7272,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by poppler (TeX Live) $as_me 0.49.0, which was
+This file was extended by poppler (TeX Live) $as_me 0.50.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7338,7 +7338,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-poppler (TeX Live) config.status 0.49.0
+poppler (TeX Live) config.status 0.50.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Modified: trunk/Build/source/libs/poppler/poppler-PATCHES/ChangeLog
===================================================================
--- trunk/Build/source/libs/poppler/poppler-PATCHES/ChangeLog 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-PATCHES/ChangeLog 2016-12-16 00:40:18 UTC (rev 42718)
@@ -1,3 +1,9 @@
+2016-12-16 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
+
+ Imported poppler-0.50.0 source tree from:
+ http://poppler.freedesktop.org/
+ * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted.
+
2016-11-15 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
Imported poppler-0.49.0 source tree from:
Modified: trunk/Build/source/libs/poppler/poppler-PATCHES/TL-Changes
===================================================================
--- trunk/Build/source/libs/poppler/poppler-PATCHES/TL-Changes 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-PATCHES/TL-Changes 2016-12-16 00:40:18 UTC (rev 42718)
@@ -1,4 +1,4 @@
-Changes applied to the poppler-0.49.0 tree as obtained from:
+Changes applied to the poppler-0.50.0 tree as obtained from:
http://poppler.freedesktop.org/
Removed:
Modified: trunk/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX
===================================================================
--- trunk/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX 2016-12-16 00:40:18 UTC (rev 42718)
@@ -1,6 +1,6 @@
-diff -ur poppler-0.49.0.orig/goo/GooString.h poppler-0.49.0/goo/GooString.h
---- poppler-0.49.0.orig/goo/GooString.h Mon Oct 24 06:01:46 2016
-+++ poppler-0.49.0/goo/GooString.h Tue Nov 15 17:03:25 2016
+diff -ur poppler-0.50.0.orig/goo/GooString.h poppler-0.50.0/goo/GooString.h
+--- poppler-0.50.0.orig/goo/GooString.h Fri Dec 16 04:08:06 2016
++++ poppler-0.50.0/goo/GooString.h Fri Dec 16 09:22:03 2016
@@ -36,6 +36,21 @@
#endif
Modified: trunk/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions
===================================================================
--- trunk/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions 2016-12-16 00:40:18 UTC (rev 42718)
@@ -1,6 +1,6 @@
-diff -ur poppler-0.49.0.orig/poppler/Object.h poppler-0.49.0/poppler/Object.h
---- poppler-0.49.0.orig/poppler/Object.h Mon Oct 24 02:08:37 2016
-+++ poppler-0.49.0/poppler/Object.h Tue Nov 15 17:06:39 2016
+diff -ur poppler-0.50.0.orig/poppler/Object.h poppler-0.50.0/poppler/Object.h
+--- poppler-0.50.0.orig/poppler/Object.h Fri Dec 16 04:08:06 2016
++++ poppler-0.50.0/poppler/Object.h Fri Dec 16 09:24:54 2016
@@ -148,7 +148,7 @@
Object *initStream(Stream *streamA);
Object *initRef(int numA, int genA)
Modified: trunk/Build/source/libs/poppler/poppler-src/CMakeLists.txt
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/CMakeLists.txt 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/CMakeLists.txt 2016-12-16 00:40:18 UTC (rev 42718)
@@ -22,7 +22,7 @@
endif()
set(POPPLER_MAJOR_VERSION "0")
-set(POPPLER_MINOR_VERSION "49")
+set(POPPLER_MINOR_VERSION "50")
set(POPPLER_MICRO_VERSION "0")
set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
@@ -168,13 +168,13 @@
set(USE_OPENJPEG2 FALSE)
set(WITH_OPENJPEG FALSE)
if(ENABLE_LIBOPENJPEG STREQUAL "auto")
- find_package(LIBOPENJPEG)
- set(USE_OPENJPEG1 ${LIBOPENJPEG_FOUND})
- set(WITH_OPENJPEG ${LIBOPENJPEG_FOUND})
- if(NOT LIBOPENJPEG_FOUND)
- find_package(LIBOPENJPEG2)
- set(USE_OPENJPEG2 ${LIBOPENJPEG2_FOUND})
- set(WITH_OPENJPEG ${LIBOPENJPEG2_FOUND})
+ find_package(LIBOPENJPEG2)
+ set(USE_OPENJPEG2 ${LIBOPENJPEG2_FOUND})
+ set(WITH_OPENJPEG ${LIBOPENJPEG2_FOUND})
+ if(NOT LIBOPENJPEG2_FOUND)
+ find_package(LIBOPENJPEG)
+ set(USE_OPENJPEG1 ${LIBOPENJPEG_FOUND})
+ set(WITH_OPENJPEG ${LIBOPENJPEG_FOUND})
endif()
elseif(ENABLE_LIBOPENJPEG STREQUAL "openjpeg1")
find_package(LIBOPENJPEG)
@@ -502,7 +502,7 @@
else(MSVC)
add_library(poppler SHARED ${poppler_SRCS})
endif(MSVC)
-set_target_properties(poppler PROPERTIES VERSION 65.0.0 SOVERSION 65)
+set_target_properties(poppler PROPERTIES VERSION 66.0.0 SOVERSION 66)
target_link_libraries(poppler LINK_PRIVATE ${poppler_LIBS})
install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
@@ -779,5 +779,5 @@
endif(ENABLE_ZLIB_UNCOMPRESS)
if(NOT WITH_OPENJPEG)
- message("Warning: Using libopenjpeg is recommended. The internal JPX decoder is unmaintained.")
+ message("Warning: Using libopenjpeg2 is recommended. The internal JPX decoder is unmaintained.")
endif(NOT WITH_OPENJPEG)
Modified: trunk/Build/source/libs/poppler/poppler-src/ChangeLog
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/ChangeLog 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/ChangeLog 2016-12-16 00:40:18 UTC (rev 42718)
@@ -1,3 +1,321 @@
+commit 281f3a2ec4be515a8876a66575341f404a6a0208
+Author: Albert Astals Cid <aacid at kde.org>
+Date: Thu Dec 15 23:32:41 2016 +0100
+
+ Poppler 0.50
+
+ CMakeLists.txt | 4 ++--
+ NEWS | 25 +++++++++++++++++++++++++
+ configure.ac | 2 +-
+ cpp/Doxyfile | 2 +-
+ poppler/Makefile.am | 2 +-
+ qt4/src/CMakeLists.txt | 2 +-
+ qt4/src/Doxyfile | 2 +-
+ qt4/src/Makefile.am | 2 +-
+ qt5/src/CMakeLists.txt | 2 +-
+ qt5/src/Doxyfile | 2 +-
+ qt5/src/Makefile.am | 2 +-
+ 11 files changed, 36 insertions(+), 11 deletions(-)
+
+commit 1511523450f40b539fb1d58950a907f3712fd5c7
+Author: Albert Astals Cid <aacid at kde.org>
+Date: Thu Dec 15 22:04:04 2016 +0100
+
+ Refine previous fix a bit
+
+ Call GfxColorSpace::setupColorProfiles only when we really need it
+
+ poppler/GfxState.cc | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+commit 9b016440725de086fa87fcbf776e27acee2c01b7
+Author: Marek Kasik <mkasik at redhat.com>
+Date: Wed Sep 21 12:28:16 2016 +0200
+
+ Don't crash when calling cmsGetColorSpace()
+
+ Initialize RGBProfile and displayProfile before their use
+ if they were not initialized in GfxState's constructor.
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=97870
+
+ poppler/GfxState.cc | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 8321b400adf6c042cd630ceea7f54fcf6862211d
+Author: Albert Astals Cid <aacid at kde.org>
+Date: Thu Dec 15 18:02:30 2016 +0100
+
+ Add one more const
+
+ Makes clang happier (i.e. gives one warning less)
+
+ fofi/FoFiEncodings.cc | 18 ++++++++++++++++--
+ fofi/FoFiEncodings.h | 18 ++++++++++++++++--
+ 2 files changed, 32 insertions(+), 4 deletions(-)
+
+commit 1a6e4b65197391b23c2163b939d4787f2058a2e1
+Author: Jason Crain <jason at inspiresomeone.us>
+Date: Wed Dec 7 09:28:58 2016 -0600
+
+ cairo: initialize CairoOutputDev::antialias
+
+ Initialize CairoOutputDev::antialias to CAIRO_ANTIALIAS_DEFAULT.
+
+ Bug #98983
+
+ poppler/CairoOutputDev.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 2cf901c817fc99e1fa57745c11aa79cdfb4e8c99
+Author: William Bader <william at newspapersystems.com>
+Date: Thu Dec 8 21:45:18 2016 +0100
+
+ Fix PS conversion for some files
+
+ Bug #63963
+
+ fofi/FoFiTrueType.cc | 13 ++++++++++++-
+ fofi/FoFiTrueType.h | 2 ++
+ poppler/PSOutputDev.cc | 26 ++++++++++++++++++++++++++
+ poppler/PSOutputDev.h | 1 +
+ 4 files changed, 41 insertions(+), 1 deletion(-)
+
+commit 97b801b55b9bd33f20723c7139cf845a1cba5bd3
+Author: Albert Astals Cid <aacid at kde.org>
+Date: Wed Dec 7 22:52:24 2016 +0100
+
+ Remove useless include
+
+ utils/pdftohtml.cc | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+commit 7ac94c8f552f0db13334d4d014cfdb54de72c451
+Author: Albert Astals Cid <aacid at kde.org>
+Date: Wed Dec 7 22:38:48 2016 +0100
+
+ nSharedGroups doesn't need to be a class member
+
+ And also mark some variables as const to make it easier to see they
+ don't change
+
+ poppler/Hints.cc | 20 +++++++-------------
+ poppler/Hints.h | 1 -
+ 2 files changed, 7 insertions(+), 14 deletions(-)
+
+commit 4c4b913802c79eb8bf9c0ce72a08842851f1c5bc
+Author: Jeffrey Morlan <jmmorlan at sonic.net>
+Date: Wed Dec 7 22:36:26 2016 +0100
+
+ Bail out if nBitsNumObjects or nBitsDiffGroupLength are greater
+ than 32
+
+ Bug #94941
+
+ poppler/Hints.cc | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit 21cd08e34bd317b2ecc7c8b4e0d122d85bdf6714
+Author: Albert Astals Cid <aacid at kde.org>
+Date: Sat Dec 3 02:18:58 2016 +0100
+
+ Default to libopenjpeg2 instead of libopenjpeg1
+
+ Tested 2.1.1 and it's better or equal than the old libopenjpeg1
+
+ I thought of doing a version check but i don't think it's common
+ someone will be building a new poppler with an old libopenjpeg2
+
+ CMakeLists.txt | 16 ++++++++--------
+ configure.ac | 31 ++++++++++++++++---------------
+ 2 files changed, 24 insertions(+), 23 deletions(-)
+
+commit b5f3e935c3a1f4824fcd681e291c35852966bb45
+Author: Albert Astals Cid <aacid at kde.org>
+Date: Fri Dec 2 00:09:38 2016 +0100
+
+ Revert "introduced hex string as a new Object type and used it for
+ file identifier"
+
+ This reverts commit debd1361f4a4cb7811677ab7a8f241b8b6fca5f9.
+
+ poppler/Lexer.cc | 3 +--
+ poppler/Object.cc | 15 ++-------------
+ poppler/Object.h | 16 +++-------------
+ poppler/PDFDoc.cc | 10 ----------
+ 4 files changed, 6 insertions(+), 38 deletions(-)
+
+commit 3a260ba8b3db99b4c0a956cc615704168db30e56
+Author: Albert Astals Cid <aacid at kde.org>
+Date: Fri Dec 2 00:09:31 2016 +0100
+
+ Revert "treat file identifier as a hex string, not a basic string"
+
+ This reverts commit 628299bc02ef825609e1ade539f967bbf052be0c.
+
+ poppler/PDFDoc.cc | 12 ++++++------
+ poppler/PSOutputDev.cc | 5 ++---
+ poppler/SecurityHandler.cc | 3 +--
+ poppler/StructElement.cc | 5 ++---
+ 4 files changed, 11 insertions(+), 14 deletions(-)
+
+commit 42ef2ac51543fabb5f5f5c3a19c79020d4fb1238
+Author: Thomas Freitag <Thomas.Freitag at alfa.de>
+Date: Wed Nov 30 00:14:46 2016 +0100
+
+ Read softmask into memstrean in case of matte
+
+ In case of matte the softmask has to be read twice. This is not
+ possible when read from stdin. So this patch allocate a memstream
+ first and read the softmask into this memstream.
+
+ Bug #97803
+
+ poppler/SplashOutputDev.cc | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+commit c448e16dc4f2f3c55b06e3f1e098f45f8abacc18
+Author: William Bader <william at newspapersystems.com>
+Date: Wed Nov 30 00:00:15 2016 +0100
+
+ patch to add -passlevel1customcolor
+
+ Bug #97193
+
+ poppler/PSOutputDev.cc | 38 ++++++++++++++++----------------------
+ poppler/PSOutputDev.h | 5 +++++
+ utils/pdftops.cc | 6 +++++-
+ 3 files changed, 26 insertions(+), 23 deletions(-)
+
+commit 628299bc02ef825609e1ade539f967bbf052be0c
+Author: Jakub Alba <jakubalba at gmail.com>
+Date: Sun Jul 24 22:46:23 2016 +0200
+
+ treat file identifier as a hex string, not a basic string
+
+ poppler/PDFDoc.cc | 12 ++++++------
+ poppler/PSOutputDev.cc | 5 +++--
+ poppler/SecurityHandler.cc | 3 ++-
+ poppler/StructElement.cc | 5 +++--
+ 4 files changed, 14 insertions(+), 11 deletions(-)
+
+commit debd1361f4a4cb7811677ab7a8f241b8b6fca5f9
+Author: Jakub Alba <jakubalba at gmail.com>
+Date: Sun Jul 24 22:30:30 2016 +0200
+
+ introduced hex string as a new Object type and used it for file
+ identifier
+
+ File identifiers are usually written as hex strings (and this is
+ how the PDF
+ reference presents them in an example). Until now, poppler was
+ reading hex
+ strings properly, but was forgeting about the fact that a given
+ string is a hex
+ string, so e.g. file identifier was first read as a hex string and
+ then printed as
+ an ordinary string and thanks to that what was printed was actually
+ junk. This
+ commit fixes that.
+
+ poppler/Lexer.cc | 3 ++-
+ poppler/Object.cc | 15 +++++++++++++--
+ poppler/Object.h | 16 +++++++++++++---
+ poppler/PDFDoc.cc | 10 ++++++++++
+ 4 files changed, 38 insertions(+), 6 deletions(-)
+
+commit 484d9d46e8995f12ce941be1e080e98e2ff4b95d
+Author: Albert Astals Cid <aacid at kde.org>
+Date: Fri Nov 25 20:05:19 2016 +0100
+
+ Spelling fixes spotted by William Bader
+
+ qt4/src/poppler-optcontent.h | 2 +-
+ qt5/src/poppler-optcontent.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit bc11784e143d462d62d3f63fc61e58b4b9640da7
+Author: Albert Astals Cid <aacid at kde.org>
+Date: Fri Nov 25 17:42:27 2016 +0100
+
+ Qt: Support OCG state change links
+
+ qt4/src/poppler-link-private.h | 57 +++++++++++++++++++
+ qt4/src/poppler-link.cc | 33 +++++------
+ qt4/src/poppler-link.h | 34 +++++++++++-
+ qt4/src/poppler-optcontent-private.h | 3 +-
+ qt4/src/poppler-optcontent.cc | 103
+ +++++++++++++++++++++++------------
+ qt4/src/poppler-optcontent.h | 8 +++
+ qt4/src/poppler-page.cc | 11 +++-
+ qt5/src/poppler-link-private.h | 57 +++++++++++++++++++
+ qt5/src/poppler-link.cc | 33 +++++------
+ qt5/src/poppler-link.h | 34 +++++++++++-
+ qt5/src/poppler-optcontent-private.h | 3 +-
+ qt5/src/poppler-optcontent.cc | 103
+ +++++++++++++++++++++++------------
+ qt5/src/poppler-optcontent.h | 8 +++
+ qt5/src/poppler-page.cc | 11 +++-
+ 14 files changed, 382 insertions(+), 116 deletions(-)
+
+commit b4e93c374deaaf31121a666c987a35bc9554beb3
+Author: Kenji Uno <ku at digitaldolphins.jp>
+Date: Thu Nov 3 10:19:06 2016 +0900
+
+ Fix pdftoppm -tiff -gray/-mono incorrect output.
+
+ - SplashBitmap has imageWriterFormat that ImgWriter
+ should accept.
+
+ splash/SplashBitmap.cc | 93
+ +++++++++++++++++++++++++++++++++++++-------------
+ splash/SplashBitmap.h | 3 +-
+ 2 files changed, 71 insertions(+), 25 deletions(-)
+
+commit 5a04becc4940b926744e64d3b7d0355adcabf282
+Author: Jakub Alba <jakubalba at gmail.com>
+Date: Fri Jun 17 13:41:39 2016 +0200
+
+ Fix PDFDoc::saveIncrementalUpdate()'s detection of document being
+ modified
+
+ Bug 96561
+
+ poppler/PDFDoc.cc | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit 0c9c2089f52de5bb08717518c439fa8bbb99011f
+Author: Albert Astals Cid <aacid at kde.org>
+Date: Wed Nov 23 20:22:17 2016 +0100
+
+ Fix Outline parsing on broken documents
+
+ Broken documents in which the parent "Last" pointer is earlier than
+ the siblings "Next" pointer
+
+ This mimics Adobe Reader behaviour.
+
+ Bug #98732
+
+ poppler/Outline.cc | 18 ++++--------------
+ poppler/Outline.h | 4 ++--
+ 2 files changed, 6 insertions(+), 16 deletions(-)
+
+commit e59cbaf9c1ab4a575633ee3263244e03c6d21713
+Author: Jason Crain <jason at inspiresomeone.us>
+Date: Fri Nov 18 15:44:29 2016 -0600
+
+ glib: Use g_slice_new0 for PopplerActionLayer
+
+ PDFs using PopplerActionLayer will sometimes crash because they are
+ allocated with g_new0 but freed with g_slice_free. Change the
+ allocation to use g_slice_new0.
+
+ Bug #98786
+
+ glib/poppler-action.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
commit 02e2d8e2c3004c36d1f8f798e5a7a30166f48f37
Author: Albert Astals Cid <aacid at kde.org>
Date: Tue Nov 15 00:10:43 2016 +0100
Modified: trunk/Build/source/libs/poppler/poppler-src/NEWS
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/NEWS 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/NEWS 2016-12-16 00:40:18 UTC (rev 42718)
@@ -1,3 +1,28 @@
+Release 0.50.0
+ core:
+ * PSOutputDev: Fix PS conversion for some files. Bug #63963
+ * Fix Outline parsing on broken documents. Bug #98732
+ * Fix PDFDoc::saveIncrementalUpdate()'s detection of document being modified. Bug #96561
+ * SplashOutputDev: Read softmask into memstrean in case of matte. Bug #97803
+ * Bail out if Hints nBitsNumObjects or nBitsDiffGroupLength are greater than 32. Bug #94941
+ * CairoOutputDev: initialize CairoOutputDev::antialias. Bug #98983
+ * Fix crash when loading some thumbnails. Bug #97870
+
+ utils:
+ * pdftoppm: Fix -tiff -gray/-mono incorrect output.
+ * pdftops: add -passlevel1customcolor. Bug #97193
+
+
+ build system:
+ * Default to libopenjpeg2 instead of libopenjpeg1
+
+ qt:
+ * Support OCG state change links
+
+ glib:
+ * Use g_slice_new0 for PopplerActionLayer. Bug #98786
+
+
Release 0.49.0
core:
* Merge type3 glyph handling from xpdf 3.04. Bug #96667
Modified: trunk/Build/source/libs/poppler/poppler-src/configure.ac
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/configure.ac 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/configure.ac 2016-12-16 00:40:18 UTC (rev 42718)
@@ -1,5 +1,5 @@
m4_define([poppler_version_major],[0])
-m4_define([poppler_version_minor],[49])
+m4_define([poppler_version_minor],[50])
m4_define([poppler_version_micro],[0])
m4_define([poppler_version],[poppler_version_major.poppler_version_minor.poppler_version_micro])
@@ -207,25 +207,26 @@
openjpeg_header=yes
-dnl test for libopenjpeg1
-if test x$enable_libopenjpeg = xopenjpeg1 || test x$enable_libopenjpeg = xauto; then
- PKG_CHECK_MODULES(LIBOPENJPEG, libopenjpeg,
- [openjpeg1="yes"],
- [AC_CHECK_LIB([openjpeg], [opj_cio_open],
- [openjpeg1="yes"
- LIBOPENJPEG_LIBS="-lopenjpeg"],[openjpeg_header=no])
- AC_CHECK_HEADERS([openjpeg.h],,
- [openjpeg_header="no"])])
+dnl test for libopenjpeg2
+if test x$enable_libopenjpeg = xopenjpeg2 || test x$enable_libopenjpeg = xauto; then
+ PKG_CHECK_MODULES(LIBOPENJPEG, libopenjp2,
+ [openjpeg2=yes],[openjpeg2=no])
fi
-dnl test for libopenjpeg2
-if test x$openjpeg1 = xno; then
- if test x$enable_libopenjpeg = xopenjpeg2 || test x$enable_libopenjpeg = xauto; then
- PKG_CHECK_MODULES(LIBOPENJPEG, libopenjp2,
- [openjpeg2=yes],[openjpeg2=no])
+dnl test for libopenjpeg1
+if test x$openjpeg2 = xno; then
+ if test x$enable_libopenjpeg = xopenjpeg1 || test x$enable_libopenjpeg = xauto; then
+ PKG_CHECK_MODULES(LIBOPENJPEG, libopenjpeg,
+ [openjpeg1="yes"],
+ [AC_CHECK_LIB([openjpeg], [opj_cio_open],
+ [openjpeg1="yes"
+ LIBOPENJPEG_LIBS="-lopenjpeg"],[openjpeg_header=no])
+ AC_CHECK_HEADERS([openjpeg.h],,
+ [openjpeg_header="no"])])
fi
fi
+
if test x$enable_libopenjpeg = xopenjpeg1 && test x$openjpeg1 = xno; then
if test x$openjpeg_header = xno; then
AC_MSG_ERROR("*** libopenjpeg headers not found ***")
@@ -1085,5 +1086,5 @@
fi
if test x$enable_libopenjpeg != xyes; then
- echo " Warning: Using libopenjpeg is recommended. The internal JPX decoder is unmaintained."
+ echo " Warning: Using libopenjpeg2 is recommended. The internal JPX decoder is unmaintained."
fi
Modified: trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.cc 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.cc 2016-12-16 00:40:18 UTC (rev 42718)
@@ -6,6 +6,20 @@
//
//========================================================================
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2016 Albert Astals Cid <aacid at kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
#include <config.h>
#ifdef USE_GCC_PRAGMAS
@@ -19,7 +33,7 @@
// Type 1 and 1C font data
//------------------------------------------------------------------------
-const char *fofiType1StandardEncoding[256] = {
+const char * const fofiType1StandardEncoding[256] = {
NULL,
NULL,
NULL,
@@ -278,7 +292,7 @@
NULL
};
-const char *fofiType1ExpertEncoding[256] = {
+const char * const fofiType1ExpertEncoding[256] = {
NULL,
NULL,
NULL,
Modified: trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.h 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.h 2016-12-16 00:40:18 UTC (rev 42718)
@@ -6,6 +6,20 @@
//
//========================================================================
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2016 Albert Astals Cid <aacid at kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
#ifndef FOFIENCODINGS_H
#define FOFIENCODINGS_H
@@ -19,8 +33,8 @@
// Type 1 and 1C font data
//------------------------------------------------------------------------
-extern const char *fofiType1StandardEncoding[256];
-extern const char *fofiType1ExpertEncoding[256];
+extern const char * const fofiType1StandardEncoding[256];
+extern const char * const fofiType1ExpertEncoding[256];
//------------------------------------------------------------------------
// Type 1C font data
Modified: trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.cc 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.cc 2016-12-16 00:40:18 UTC (rev 42718)
@@ -22,7 +22,7 @@
// Copyright (C) 2012 Adrian Johnson <ajohnson at redneon.com>
// Copyright (C) 2014 Thomas Freitag <Thomas.Freitag at alfa.de>
// Copyright (C) 2015 Aleksei Volkov <Aleksei Volkov>
-// Copyright (C) 2015 William Bader <williambader at hotmail.com>
+// Copyright (C) 2015, 2016 William Bader <williambader at hotmail.com>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -727,6 +727,7 @@
void FoFiTrueType::convertToType0(char *psName, int *cidMap, int nCIDs,
GBool needVerticalMetrics,
+ int *maxValidGlyph,
FoFiOutputFunc outputFunc,
void *outputStream) {
GooString *buf;
@@ -733,6 +734,8 @@
GooString *sfntsName;
int maxUsedGlyph, n, i, j;
+ *maxValidGlyph = -1;
+
if (openTypeCFF) {
return;
}
@@ -754,6 +757,13 @@
// that refers to one of the unused glyphs -- this results in PS
// errors if we simply use maxUsedGlyph+1 for the Type 0 font. So
// we compromise by always defining at least 256 glyphs.)
+ // Some fonts have a large nGlyphs but maxUsedGlyph of 0.
+ // These fonts might reference any glyph.
+ // Return the last written glyph number in maxValidGlyph.
+ // PSOutputDev::drawString() can use maxValidGlyph to avoid
+ // referencing zero-length glyphs that we trimmed.
+ // This allows pdftops to avoid writing huge files while still
+ // handling the rare PDF that uses a zero-length glyph.
if (cidMap) {
n = nCIDs;
} else if (nGlyphs > maxUsedGlyph + 256) {
@@ -765,6 +775,7 @@
} else {
n = nGlyphs;
}
+ *maxValidGlyph = n-1;
for (i = 0; i < n; i += 256) {
(*outputFunc)(outputStream, "10 dict begin\n", 14);
(*outputFunc)(outputStream, "/FontName /", 11);
Modified: trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.h 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.h 2016-12-16 00:40:18 UTC (rev 42718)
@@ -17,6 +17,7 @@
// Copyright (C) 2007 Koji Otani <sho at bbr.jp>
// Copyright (C) 2011, 2012 Albert Astals Cid <aacid at kde.org>
// Copyright (C) 2012 Suzuki Toshiya <mpsuzuki at hiroshima-u.ac.jp>
+// Copyright (C) 2016 William Bader <williambader at hotmail.com>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -144,6 +145,7 @@
// <nCIDs> entries. (Not useful for OpenType CFF fonts.)
void convertToType0(char *psName, int *cidMap, int nCIDs,
GBool needVerticalMetrics,
+ int *maxValidGlyph,
FoFiOutputFunc outputFunc, void *outputStream);
// Convert to a Type 0 (but non-CID) composite font, suitable for
Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc 2016-12-16 00:40:18 UTC (rev 42718)
@@ -150,6 +150,7 @@
inType3Char = gFalse;
t3_glyph_has_bbox = gFalse;
text_matrix_valid = gTrue;
+ antialias = CAIRO_ANTIALIAS_DEFAULT;
groupColorSpaceStack = NULL;
maskStack = NULL;
Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/GfxState.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/GfxState.cc 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/GfxState.cc 2016-12-16 00:40:18 UTC (rev 42718)
@@ -28,6 +28,7 @@
// Copyright (C) 2013 Hib Eris <hib at hiberis.nl>
// Copyright (C) 2013 Fabio D'Urso <fabiodurso at hotmail.it>
// Copyright (C) 2015 Adrian Johnson <ajohnson at redneon.com>
+// Copyright (C) 2016 Marek Kasik <mkasik at redhat.com>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -2050,7 +2051,12 @@
error(errSyntaxWarning, -1, "read ICCBased color space profile error");
} else {
cmsHPROFILE dhp = (state != NULL && state->getDisplayProfile() != NULL) ? state->getDisplayProfile() : displayProfile;
- if (dhp == NULL) dhp = RGBProfile;
+ if (dhp == NULL) {
+ if (unlikely(RGBProfile == NULL)) {
+ GfxColorSpace::setupColorProfiles();
+ }
+ dhp = RGBProfile;
+ }
unsigned int cst = getCMSColorSpaceType(cmsGetColorSpace(hp));
unsigned int dNChannels = getCMSNChannels(cmsGetColorSpace(dhp));
unsigned int dcst = getCMSColorSpaceType(cmsGetColorSpace(dhp));
Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/Hints.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/Hints.cc 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/Hints.cc 2016-12-16 00:40:18 UTC (rev 42718)
@@ -9,6 +9,7 @@
// Copyright 2010, 2013 Pino Toscano <pino at kde.org>
// Copyright 2013 Adrian Johnson <ajohnson at redneon.com>
// Copyright 2014 Fabio D'Urso <fabiodurso at hotmail.it>
+// Copyright 2016 Jeffrey Morlan <jmmorlan at sonic.net>
//
//========================================================================
@@ -140,7 +141,6 @@
memset(numSharedObject, 0, nPages * sizeof(Guint));
memset(pageObjectNum, 0, nPages * sizeof(int));
- nSharedGroups = 0;
groupLength = NULL;
groupOffset = NULL;
groupHasSignature = NULL;
@@ -350,31 +350,32 @@
{
StreamBitReader sbr(str);
- Guint firstSharedObjectNumber = sbr.readBits(32);
+ const Guint firstSharedObjectNumber = sbr.readBits(32);
- Guint firstSharedObjectOffset = sbr.readBits(32);
- firstSharedObjectOffset += hintsLength;
+ const Guint firstSharedObjectOffset = sbr.readBits(32) + hintsLength;
- Guint nSharedGroupsFirst = sbr.readBits(32);
+ const Guint nSharedGroupsFirst = sbr.readBits(32);
- Guint nSharedGroups = sbr.readBits(32);
+ const Guint nSharedGroups = sbr.readBits(32);
- Guint nBitsNumObjects = sbr.readBits(16);
+ const Guint nBitsNumObjects = sbr.readBits(16);
- Guint groupLengthLeast = sbr.readBits(32);
+ const Guint groupLengthLeast = sbr.readBits(32);
- Guint nBitsDiffGroupLength = sbr.readBits(16);
+ const Guint nBitsDiffGroupLength = sbr.readBits(16);
if ((!nSharedGroups) || (nSharedGroups >= INT_MAX / (int)sizeof(Guint))) {
error(errSyntaxWarning, -1, "Invalid number of shared object groups");
- nSharedGroups = 0;
return gFalse;
}
if ((!nSharedGroupsFirst) || (nSharedGroupsFirst > nSharedGroups)) {
error(errSyntaxWarning, -1, "Invalid number of first page shared object groups");
- nSharedGroups = 0;
return gFalse;
}
+ if (nBitsNumObjects > 32 || nBitsDiffGroupLength > 32) {
+ error(errSyntaxWarning, -1, "Invalid shared object groups bit length");
+ return gFalse;
+ }
groupLength = (Guint *) gmallocn_checkoverflow(nSharedGroups, sizeof(Guint));
groupOffset = (Guint *) gmallocn_checkoverflow(nSharedGroups, sizeof(Guint));
@@ -384,7 +385,6 @@
if (!groupLength || !groupOffset || !groupHasSignature ||
!groupNumObjects || !groupXRefOffset) {
error(errSyntaxWarning, -1, "Failed to allocate memory for shared object groups");
- nSharedGroups = 0;
return gFalse;
}
Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/Hints.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/Hints.h 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/Hints.h 2016-12-16 00:40:18 UTC (rev 42718)
@@ -79,7 +79,6 @@
Guint *numSharedObject;
Guint **sharedObjectId;
- Guint nSharedGroups;
Guint *groupLength;
Guint *groupOffset;
Guint *groupHasSignature;
Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/Makefile.am
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/Makefile.am 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/Makefile.am 2016-12-16 00:40:18 UTC (rev 42718)
@@ -327,7 +327,7 @@
$(win32_libs)
libpoppler_la_LDFLAGS = \
- -version-info 65:0:0 \
+ -version-info 66:0:0 \
@create_shared_lib@ \
@auto_import_flags@
Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/Outline.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/Outline.cc 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/Outline.cc 2016-12-16 00:40:18 UTC (rev 42718)
@@ -14,7 +14,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2005 Marco Pesenti Gritti <mpg at redhat.com>
-// Copyright (C) 2008 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2008, 2016 Albert Astals Cid <aacid at kde.org>
// Copyright (C) 2009 Nick Jones <nick.jones at network-box.com>
// Copyright (C) 2016 Jason Crain <jason at aquaticape.us>
//
@@ -47,9 +47,7 @@
if (!outlineObj->isDict()) {
return;
}
- items = OutlineItem::readItemList(outlineObj->dictLookupNF("First", &first),
- outlineObj->dictLookupNF("Last", &last),
- xref);
+ items = OutlineItem::readItemList(outlineObj->dictLookupNF("First", &first), xref);
first.free();
last.free();
}
@@ -115,8 +113,7 @@
nextRef.free();
}
-GooList *OutlineItem::readItemList(Object *firstItemRef, Object *lastItemRef,
- XRef *xrefA) {
+GooList *OutlineItem::readItemList(Object *firstItemRef, XRef *xrefA) {
GooList *items;
char* alreadyRead;
OutlineItem *item;
@@ -123,9 +120,6 @@
Object obj;
Object *p;
- if (!lastItemRef->isRef())
- return NULL;
-
items = new GooList();
alreadyRead = (char *)gmalloc(xrefA->getNumObjects());
@@ -144,10 +138,6 @@
item = new OutlineItem(obj.getDict(), xrefA);
obj.free();
items->append(item);
- if (p->getRef().num == lastItemRef->getRef().num &&
- p->getRef().gen == lastItemRef->getRef().gen) {
- break;
- }
p = &item->nextRef;
}
@@ -163,7 +153,7 @@
void OutlineItem::open() {
if (!kids) {
- kids = readItemList(&firstRef, &lastRef, xref);
+ kids = readItemList(&firstRef, xref);
}
}
Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/Outline.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/Outline.h 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/Outline.h 2016-12-16 00:40:18 UTC (rev 42718)
@@ -14,6 +14,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2005 Marco Pesenti Gritti <mpg at redhat.com>
+// Copyright (C) 2016 Albert Astals Cid <aacid at kde.org>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -59,8 +60,7 @@
OutlineItem(Dict *dict, XRef *xrefA);
~OutlineItem();
- static GooList *readItemList(Object *firstItemRef, Object *lastItemRef,
- XRef *xrefA);
+ static GooList *readItemList(Object *firstItemRef, XRef *xrefA);
void open();
void close();
Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc 2016-12-16 00:40:18 UTC (rev 42718)
@@ -1028,7 +1028,9 @@
}
}
xref->unlock();
- if (uxref->getNumObjects() == 0) { //we have nothing to update
+ // because of "uxref->add(0, 65535, 0, gFalse);" uxref->getNumObjects() will
+ // always be >= 1; if it is 1, it means there is nothing to update
+ if (uxref->getNumObjects() == 1) {
delete uxref;
return;
}
Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc 2016-12-16 00:40:18 UTC (rev 42718)
@@ -1103,6 +1103,7 @@
fontIDs = NULL;
fontNames = new GooHash(gTrue);
+ fontMaxValidGlyph = new GooHash(gTrue);
t1FontNames = NULL;
font8Info = NULL;
font16Enc = NULL;
@@ -1171,6 +1172,7 @@
fontIDs = NULL;
fontNames = new GooHash(gTrue);
+ fontMaxValidGlyph = new GooHash(gTrue);
t1FontNames = NULL;
font8Info = NULL;
font16Enc = NULL;
@@ -1247,6 +1249,7 @@
embedCIDTrueType = gTrue;
fontPassthrough = gFalse;
optimizeColorSpace = gFalse;
+ passLevel1CustomColor = gFalse;
preloadImagesForms = gFalse;
generateOPI = gFalse;
useASCIIHex = gFalse;
@@ -1496,6 +1499,7 @@
gfree(fontIDs);
}
delete fontNames;
+ delete fontMaxValidGlyph;
if (t1FontNames) {
for (i = 0; i < t1FontNameLen; ++i) {
delete t1FontNames[i].psName;
@@ -1649,6 +1653,7 @@
}
} else if ((level == psLevel1 && lev1 && nonSep) ||
(level == psLevel1Sep && lev1 && sep) ||
+ (level == psLevel1Sep && lev2 && sep && getPassLevel1CustomColor()) ||
(level == psLevel2 && lev2 && nonSep) ||
(level == psLevel2Sep && lev2 && sep) ||
(level == psLevel3 && lev3 && nonSep) ||
@@ -2608,10 +2613,15 @@
outputFunc, outputStream);
} else {
// otherwise: use a non-CID composite font
+ int maxValidGlyph = -1;
ffTT->convertToType0(psName->getCString(),
codeToGID, codeToGIDLen,
needVerticalMetrics,
+ &maxValidGlyph,
outputFunc, outputStream);
+ if (maxValidGlyph >= 0 && font->getName()) {
+ fontMaxValidGlyph->replace(font->getName()->copy(), maxValidGlyph);
+ }
}
gfree(codeToGID);
} else {
@@ -2704,11 +2714,16 @@
outputFunc, outputStream);
} else {
// otherwise: use a non-CID composite font
+ int maxValidGlyph = -1;
ffTT->convertToType0(psName->getCString(),
((GfxCIDFont *)font)->getCIDToGID(),
((GfxCIDFont *)font)->getCIDToGIDLen(),
needVerticalMetrics,
+ &maxValidGlyph,
outputFunc, outputStream);
+ if (maxValidGlyph > 0 && font->getName()) {
+ fontMaxValidGlyph->replace(font->getName()->copy(), maxValidGlyph);
+ }
}
delete ffTT;
}
@@ -4123,15 +4138,6 @@
state->getFillGray(&gray);
writePSFmt("{0:.4g} g\n", colToDbl(gray));
break;
- case psLevel1Sep:
- state->getFillCMYK(&cmyk);
- c = colToDbl(cmyk.c);
- m = colToDbl(cmyk.m);
- y = colToDbl(cmyk.y);
- k = colToDbl(cmyk.k);
- writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} k\n", c, m, y, k);
- addProcessColor(c, m, y, k);
- break;
case psLevel2:
case psLevel3:
if (state->getFillColorSpace()->getMode() != csPattern) {
@@ -4146,9 +4152,10 @@
writePS("] sc\n");
}
break;
+ case psLevel1Sep:
case psLevel2Sep:
case psLevel3Sep:
- if (state->getFillColorSpace()->getMode() == csSeparation) {
+ if (state->getFillColorSpace()->getMode() == csSeparation && (level > psLevel1Sep || getPassLevel1CustomColor())) {
sepCS = (GfxSeparationColorSpace *)state->getFillColorSpace();
color.c[0] = gfxColorComp1;
sepCS->getCMYK(&color, &cmyk);
@@ -4189,15 +4196,6 @@
state->getStrokeGray(&gray);
writePSFmt("{0:.4g} G\n", colToDbl(gray));
break;
- case psLevel1Sep:
- state->getStrokeCMYK(&cmyk);
- c = colToDbl(cmyk.c);
- m = colToDbl(cmyk.m);
- y = colToDbl(cmyk.y);
- k = colToDbl(cmyk.k);
- writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} K\n", c, m, y, k);
- addProcessColor(c, m, y, k);
- break;
case psLevel2:
case psLevel3:
if (state->getStrokeColorSpace()->getMode() != csPattern) {
@@ -4212,9 +4210,10 @@
writePS("] SC\n");
}
break;
+ case psLevel1Sep:
case psLevel2Sep:
case psLevel3Sep:
- if (state->getStrokeColorSpace()->getMode() == csSeparation) {
+ if (state->getStrokeColorSpace()->getMode() == csSeparation && (level > psLevel1Sep || getPassLevel1CustomColor())) {
sepCS = (GfxSeparationColorSpace *)state->getStrokeColorSpace();
color.c[0] = gfxColorComp1;
sepCS->getCMYK(&color, &cmyk);
@@ -5065,6 +5064,8 @@
char buf[8];
double *dxdy;
int dxdySize, len, nChars, uLen, n, m, i, j;
+ int maxGlyphInt;
+ CharCode maxGlyph;
// for pdftohtml, output PS without text
if( displayText == gFalse )
@@ -5084,6 +5085,9 @@
if (!(font = state->getFont())) {
return;
}
+ maxGlyphInt = (font->getName()? fontMaxValidGlyph->lookupInt(font->getName()): 0);
+ if (maxGlyphInt < 0) maxGlyphInt = 0;
+ maxGlyph = (CharCode) maxGlyphInt;
wMode = font->getWMode();
// check for a subtitute 16-bit font
@@ -5158,6 +5162,14 @@
dxdy[2 * nChars + 1] = dy;
++nChars;
}
+ } else if (maxGlyph > 0 && code > maxGlyph) {
+ // Ignore this code.
+ // Using it will exceed the number of glyphs in the font and generate
+ // /rangecheck in --xyshow--
+ if (nChars > 0) {
+ dxdy[2 * (nChars-1) ] += dx;
+ dxdy[2 * (nChars-1) + 1 ] += dy;
+ }
} else {
if (nChars + 1 > dxdySize) {
dxdySize *= 2;
@@ -5888,7 +5900,11 @@
// color space
if (colorMap) {
- dumpColorSpaceL2(colorMap->getColorSpace(), gFalse, gTrue, gFalse);
+ // Do not update the process color list for custom colors
+ GBool isCustomColor =
+ (level == psLevel1Sep || level == psLevel2Sep || level == psLevel3Sep) &&
+ colorMap->getColorSpace()->getMode() == csDeviceN;
+ dumpColorSpaceL2(colorMap->getColorSpace(), gFalse, !isCustomColor, gFalse);
writePS(" setcolorspace\n");
}
@@ -6287,7 +6303,11 @@
// color space
if (colorMap) {
- dumpColorSpaceL2(colorMap->getColorSpace(), gFalse, gTrue, gFalse);
+ // Do not update the process color list for custom colors
+ GBool isCustomColor =
+ (level == psLevel1Sep || level == psLevel2Sep || level == psLevel3Sep) &&
+ colorMap->getColorSpace()->getMode() == csDeviceN;
+ dumpColorSpaceL2(colorMap->getColorSpace(), gFalse, !isCustomColor, gFalse);
writePS(" setcolorspace\n");
}
Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.h 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.h 2016-12-16 00:40:18 UTC (rev 42718)
@@ -320,6 +320,7 @@
GBool getEmbedCIDTrueType() const { return embedCIDTrueType; }
GBool getFontPassthrough() const { return fontPassthrough; }
GBool getOptimizeColorSpace() const { return optimizeColorSpace; }
+ GBool getPassLevel1CustomColor() const { return passLevel1CustomColor; }
GBool getEnableLZW() const { return enableLZW; };
GBool getEnableFlate() const
#if ENABLE_ZLIB
@@ -333,6 +334,7 @@
void setEmbedCIDTrueType(GBool b) { embedCIDTrueType = b; }
void setFontPassthrough(GBool b) { fontPassthrough = b; }
void setOptimizeColorSpace(GBool b) { optimizeColorSpace = b; }
+ void setPassLevel1CustomColor(GBool b) { passLevel1CustomColor = b; }
void setPreloadImagesForms(GBool b) { preloadImagesForms = b; }
void setGenerateOPI(GBool b) { generateOPI = b; }
void setUseASCIIHex(GBool b) { useASCIIHex = b; }
@@ -471,6 +473,7 @@
int fontIDSize; // size of fontIDs array
std::set<int> resourceIDs; // list of object IDs of objects containing Resources we've already set up
GooHash *fontNames; // all used font names
+ GooHash *fontMaxValidGlyph; // max valid glyph of each font
PST1FontName *t1FontNames; // font names for Type 1/1C fonts
int t1FontNameLen; // number of entries in t1FontNames array
int t1FontNameSize; // size of t1FontNames array
@@ -536,6 +539,9 @@
GBool fontPassthrough; // pass all fonts through as-is?
GBool optimizeColorSpace; // false to keep gray RGB images in their original color space
// true to optimize gray images to DeviceGray color space
+ GBool passLevel1CustomColor; // false to convert all custom colors to CMYK
+ // true to pass custom colors
+ // has effect only when doing a level1sep
GBool preloadImagesForms; // preload PostScript images and forms into
// memory
GBool generateOPI; // generate PostScript OPI comments?
Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc 2016-12-16 00:40:18 UTC (rev 42718)
@@ -4015,6 +4015,16 @@
//----- set up the soft mask
+ if (maskColorMap->getMatteColor() != NULL) {
+ Guchar *data = (Guchar *) gmalloc(maskWidth * maskHeight);
+ maskStr->reset();
+ maskStr->doGetChars(maskWidth * maskHeight, data);
+ maskStr->close();
+ Object *maskDict = new Object();
+ maskDict->initDict(maskStr->getDict());
+ maskStr = new MemStream((char *)data, 0, maskWidth * maskHeight, maskDict);
+ ((MemStream *) maskStr)->setNeedFree(gTrue);
+ }
imgMaskData.imgStr = new ImageStream(maskStr, maskWidth,
maskColorMap->getNumPixelComps(),
maskColorMap->getBits());
@@ -4042,6 +4052,9 @@
maskSplash->drawImage(&imageSrc, NULL, &imgMaskData, splashModeMono8, gFalse,
maskWidth, maskHeight, mat, maskInterpolate);
delete imgMaskData.imgStr;
+ if (maskColorMap->getMatteColor() == NULL) {
+ maskStr->close();
+ }
gfree(imgMaskData.lookup);
delete maskSplash;
splash->setSoftMask(maskBitmap);
@@ -4141,7 +4154,10 @@
gfree(imgData.lookup);
delete imgData.maskStr;
delete imgData.imgStr;
- maskStr->close();
+ if (maskColorMap->getMatteColor() != NULL) {
+ maskStr->close();
+ delete maskStr;
+ }
str->close();
}
Modified: trunk/Build/source/libs/poppler/poppler-src/splash/SplashBitmap.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/splash/SplashBitmap.cc 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/splash/SplashBitmap.cc 2016-12-16 00:40:18 UTC (rev 42718)
@@ -22,6 +22,7 @@
// Copyright (C) 2011-2013 Thomas Freitag <Thomas.Freitag at alfa.de>
// Copyright (C) 2012 Anthony Wesley <awesley at smartnetworks.com.au>
// Copyright (C) 2015 Adam Reichold <adamreichold at myopera.com>
+// Copyright (C) 2016 Kenji Uno <ku at digitaldolphins.jp>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -354,6 +355,8 @@
ImgWriter *writer;
SplashError e;
+ SplashColorMode imageWriterFormat = splashModeRGB8;
+
switch (format) {
#ifdef ENABLE_LIBPNG
case splashFormatPng:
@@ -377,9 +380,11 @@
switch (mode) {
case splashModeMono1:
writer = new TiffWriter(TiffWriter::MONOCHROME);
+ imageWriterFormat = splashModeMono1;
break;
case splashModeMono8:
writer = new TiffWriter(TiffWriter::GRAY);
+ imageWriterFormat = splashModeMono8;
break;
case splashModeRGB8:
case splashModeBGR8:
@@ -408,7 +413,7 @@
return splashErrGeneric;
}
- e = writeImgFile(writer, f, hDPI, vDPI);
+ e = writeImgFile(writer, f, hDPI, vDPI, imageWriterFormat);
delete writer;
return e;
}
@@ -617,7 +622,7 @@
}
#endif
-SplashError SplashBitmap::writeImgFile(ImgWriter *writer, FILE *f, int hDPI, int vDPI) {
+SplashError SplashBitmap::writeImgFile(ImgWriter *writer, FILE *f, int hDPI, int vDPI, SplashColorMode imageWriterFormat) {
if (mode != splashModeRGB8 && mode != splashModeMono8 && mode != splashModeMono1 && mode != splashModeXBGR8 && mode != splashModeBGR8
#if SPLASH_CMYK
&& mode != splashModeCMYK8 && mode != splashModeDeviceN8
@@ -744,41 +749,81 @@
case splashModeMono8:
{
- unsigned char *row = new unsigned char[3 * width];
- for (int y = 0; y < height; y++) {
- // Convert into a PNG row
- for (int x = 0; x < width; x++) {
- row[3*x] = data[y * rowSize + x];
- row[3*x+1] = data[y * rowSize + x];
- row[3*x+2] = data[y * rowSize + x];
+ if (imageWriterFormat == splashModeMono8) {
+ SplashColorPtr row;
+ unsigned char **row_pointers = new unsigned char*[height];
+ row = data;
+
+ for (int y = 0; y < height; ++y) {
+ row_pointers[y] = row;
+ row += rowSize;
}
-
- if (!writer->writeRow(&row)) {
- delete[] row;
+ if (!writer->writePointers(row_pointers, height)) {
+ delete[] row_pointers;
return splashErrGeneric;
}
+ delete[] row_pointers;
+ } else if (imageWriterFormat == splashModeRGB8) {
+ unsigned char *row = new unsigned char[3 * width];
+ for (int y = 0; y < height; y++) {
+ // Convert into a PNG row
+ for (int x = 0; x < width; x++) {
+ row[3*x] = data[y * rowSize + x];
+ row[3*x+1] = data[y * rowSize + x];
+ row[3*x+2] = data[y * rowSize + x];
+ }
+
+ if (!writer->writeRow(&row)) {
+ delete[] row;
+ return splashErrGeneric;
+ }
+ }
+ delete[] row;
}
- delete[] row;
+ else {
+ // only splashModeMono8 or splashModeRGB8
+ return splashErrGeneric;
+ }
}
break;
case splashModeMono1:
{
- unsigned char *row = new unsigned char[3 * width];
- for (int y = 0; y < height; y++) {
- // Convert into a PNG row
- for (int x = 0; x < width; x++) {
- getPixel(x, y, &row[3*x]);
- row[3*x+1] = row[3*x];
- row[3*x+2] = row[3*x];
+ if (imageWriterFormat == splashModeMono1) {
+ SplashColorPtr row;
+ unsigned char **row_pointers = new unsigned char*[height];
+ row = data;
+
+ for (int y = 0; y < height; ++y) {
+ row_pointers[y] = row;
+ row += rowSize;
}
-
- if (!writer->writeRow(&row)) {
- delete[] row;
+ if (!writer->writePointers(row_pointers, height)) {
+ delete[] row_pointers;
return splashErrGeneric;
}
+ delete[] row_pointers;
+ } else if (imageWriterFormat == splashModeRGB8) {
+ unsigned char *row = new unsigned char[3 * width];
+ for (int y = 0; y < height; y++) {
+ // Convert into a PNG row
+ for (int x = 0; x < width; x++) {
+ getPixel(x, y, &row[3*x]);
+ row[3*x+1] = row[3*x];
+ row[3*x+2] = row[3*x];
+ }
+
+ if (!writer->writeRow(&row)) {
+ delete[] row;
+ return splashErrGeneric;
+ }
+ }
+ delete[] row;
}
- delete[] row;
+ else {
+ // only splashModeMono1 or splashModeRGB8
+ return splashErrGeneric;
+ }
}
break;
Modified: trunk/Build/source/libs/poppler/poppler-src/splash/SplashBitmap.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/splash/SplashBitmap.h 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/poppler-src/splash/SplashBitmap.h 2016-12-16 00:40:18 UTC (rev 42718)
@@ -21,6 +21,7 @@
// Copyright (C) 2010 William Bader <williambader at hotmail.com>
// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag at alfa.de>
// Copyright (C) 2015 Adam Reichold <adamreichold at myopera.com>
+// Copyright (C) 2016 Kenji Uno <ku at digitaldolphins.jp>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -74,7 +75,7 @@
SplashError writeImgFile(SplashImageFileFormat format, char *fileName, int hDPI, int vDPI, const char *compressionString = "");
SplashError writeImgFile(SplashImageFileFormat format, FILE *f, int hDPI, int vDPI, const char *compressionString = "");
- SplashError writeImgFile(ImgWriter *writer, FILE *f, int hDPI, int vDPI);
+ SplashError writeImgFile(ImgWriter *writer, FILE *f, int hDPI, int vDPI, SplashColorMode imageWriterFormat);
enum ConversionMode
{
Modified: trunk/Build/source/libs/poppler/version.ac
===================================================================
--- trunk/Build/source/libs/poppler/version.ac 2016-12-16 00:17:04 UTC (rev 42717)
+++ trunk/Build/source/libs/poppler/version.ac 2016-12-16 00:40:18 UTC (rev 42718)
@@ -8,4 +8,4 @@
dnl --------------------------------------------------------
dnl
dnl m4-include this file to define the current poppler version
-m4_define([poppler_version], [0.49.0])
+m4_define([poppler_version], [0.50.0])
More information about the tex-live-commits
mailing list