summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-07-25 03:30:45 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-07-25 03:30:45 +0000
commit312e09a8d82b140899025c17e53cc8bf9ee19fc0 (patch)
tree23d2dd08de3e4385660cd8550dcfd43ca4af5fe7
parent8a9d753ca353472ca3b3a5b2683d915633d2637e (diff)
poppler 0.46.0
git-svn-id: svn://tug.org/texlive/trunk@41757 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/libs/README2
-rw-r--r--Build/source/libs/poppler/ChangeLog5
-rwxr-xr-xBuild/source/libs/poppler/configure22
-rw-r--r--Build/source/libs/poppler/poppler-PATCHES/ChangeLog6
-rw-r--r--Build/source/libs/poppler/poppler-PATCHES/TL-Changes2
-rw-r--r--Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX6
-rw-r--r--Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions14
-rw-r--r--Build/source/libs/poppler/poppler-src/CMakeLists.txt4
-rw-r--r--Build/source/libs/poppler/poppler-src/ChangeLog317
-rw-r--r--Build/source/libs/poppler/poppler-src/NEWS33
-rw-r--r--Build/source/libs/poppler/poppler-src/configure.ac8
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.cc5
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc28
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.h4
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/Link.cc34
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/Makefile.am2
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/Object.h7
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc79
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h41
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/XRef.cc39
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/XRef.h14
-rw-r--r--Build/source/libs/poppler/version.ac2
22 files changed, 597 insertions, 77 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README
index b2e4515836d..65c9a6efc71 100644
--- a/Build/source/libs/README
+++ b/Build/source/libs/README
@@ -49,7 +49,7 @@ mpfr 3.1.4 - checked 07mar16
pixman 0.34.0 - checked 04feb16
http://cairographics.org/releases/
-poppler 0.45.0 - checked 18jun16
+poppler 0.46.0 - checked 25jul16
http://poppler.freedesktop.org/ - used by luatex and xetex
potrace 1.13 - checked 28dec15
diff --git a/Build/source/libs/poppler/ChangeLog b/Build/source/libs/poppler/ChangeLog
index d3f0c477957..bb91fcc9054 100644
--- a/Build/source/libs/poppler/ChangeLog
+++ b/Build/source/libs/poppler/ChangeLog
@@ -1,3 +1,8 @@
+2016-07-25 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Import poppler-0.46.0.
+ * version.ac: Adjust.
+
2016-06-18 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Import poppler-0.45.0.
diff --git a/Build/source/libs/poppler/configure b/Build/source/libs/poppler/configure
index 169a6ef6ab4..9db899be3c0 100755
--- a/Build/source/libs/poppler/configure
+++ b/Build/source/libs/poppler/configure
@@ -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.45.0.
+# Generated by GNU Autoconf 2.69 for poppler (TeX Live) 0.46.0.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='poppler (TeX Live)'
PACKAGE_TARNAME='poppler--tex-live-'
-PACKAGE_VERSION='0.45.0'
-PACKAGE_STRING='poppler (TeX Live) 0.45.0'
+PACKAGE_VERSION='0.46.0'
+PACKAGE_STRING='poppler (TeX Live) 0.46.0'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1306,7 +1306,7 @@ if test "$ac_init_help" = "long"; then
# 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.45.0 to adapt to many kinds of systems.
+\`configure' configures poppler (TeX Live) 0.46.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1373,7 +1373,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of poppler (TeX Live) 0.45.0:";;
+ short | recursive ) echo "Configuration of poppler (TeX Live) 0.46.0:";;
esac
cat <<\_ACEOF
@@ -1486,7 +1486,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-poppler (TeX Live) configure 0.45.0
+poppler (TeX Live) configure 0.46.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2076,7 +2076,7 @@ cat >config.log <<_ACEOF
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.45.0, which was
+It was created by poppler (TeX Live) $as_me 0.46.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3999,7 +3999,7 @@ fi
# Define the identity of the package.
PACKAGE='poppler--tex-live-'
- VERSION='0.45.0'
+ VERSION='0.46.0'
# Some tools Automake needs.
@@ -6578,7 +6578,7 @@ ac_config_headers="$ac_config_headers poppler-config.h:poppler-src/poppler/poppl
cat >>confdefs.h <<_ACEOF
-#define POPPLER_VERSION "0.45.0"
+#define POPPLER_VERSION "0.46.0"
_ACEOF
@@ -7272,7 +7272,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# 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.45.0, which was
+This file was extended by poppler (TeX Live) $as_me 0.46.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7338,7 +7338,7 @@ _ACEOF
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.45.0
+poppler (TeX Live) config.status 0.46.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/libs/poppler/poppler-PATCHES/ChangeLog b/Build/source/libs/poppler/poppler-PATCHES/ChangeLog
index df5af13901f..8eccbc3cdf3 100644
--- a/Build/source/libs/poppler/poppler-PATCHES/ChangeLog
+++ b/Build/source/libs/poppler/poppler-PATCHES/ChangeLog
@@ -1,3 +1,9 @@
+2016-07-25 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Imported poppler-0.46.0 source tree from:
+ http://poppler.freedesktop.org/
+ * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted.
+
2016-06-18 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Imported poppler-0.45.0 source tree from:
diff --git a/Build/source/libs/poppler/poppler-PATCHES/TL-Changes b/Build/source/libs/poppler/poppler-PATCHES/TL-Changes
index 67ec763600c..0e4f44b4125 100644
--- a/Build/source/libs/poppler/poppler-PATCHES/TL-Changes
+++ b/Build/source/libs/poppler/poppler-PATCHES/TL-Changes
@@ -1,4 +1,4 @@
-Changes applied to the poppler-0.45.0 tree as obtained from:
+Changes applied to the poppler-0.46.0 tree as obtained from:
http://poppler.freedesktop.org/
Removed:
diff --git a/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX b/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX
index 565e0336f7c..66a56a5851a 100644
--- a/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX
+++ b/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX
@@ -1,6 +1,6 @@
-diff -ur poppler-0.45.0.orig/goo/GooString.h poppler-0.45.0/goo/GooString.h
---- poppler-0.45.0.orig/goo/GooString.h Wed May 11 07:47:44 2016
-+++ poppler-0.45.0/goo/GooString.h Sat Jun 18 06:46:31 2016
+diff -ur poppler-0.46.0.orig/goo/GooString.h poppler-0.46.0/goo/GooString.h
+--- poppler-0.46.0.orig/goo/GooString.h Wed May 11 07:47:44 2016
++++ poppler-0.46.0/goo/GooString.h Mon Jul 25 12:04:36 2016
@@ -36,6 +36,21 @@
#endif
diff --git a/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions b/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions
index 9d530d649ca..a6c82552da3 100644
--- a/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions
+++ b/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions
@@ -1,7 +1,7 @@
-diff -ur poppler-0.45.0.orig/poppler/Object.h poppler-0.45.0/poppler/Object.h
---- poppler-0.45.0.orig/poppler/Object.h Wed Jun 01 01:40:39 2016
-+++ poppler-0.45.0/poppler/Object.h Sat Jun 18 06:49:28 2016
-@@ -147,7 +147,7 @@
+diff -ur poppler-0.46.0.orig/poppler/Object.h poppler-0.46.0/poppler/Object.h
+--- poppler-0.46.0.orig/poppler/Object.h Wed Jul 06 06:37:01 2016
++++ poppler-0.46.0/poppler/Object.h Mon Jul 25 12:08:59 2016
+@@ -148,7 +148,7 @@
Object *initStream(Stream *streamA);
Object *initRef(int numA, int genA)
{ initObj(objRef); ref.num = numA; ref.gen = genA; return this; }
@@ -10,7 +10,7 @@ diff -ur poppler-0.45.0.orig/poppler/Object.h poppler-0.45.0/poppler/Object.h
{ initObj(objCmd); cmd = copyString(cmdA); return this; }
Object *initError()
{ initObj(objError); return this; }
-@@ -194,7 +194,7 @@
+@@ -195,7 +195,7 @@
GBool isName(const char *nameA)
{ return type == objName && !strcmp(name, nameA); }
GBool isDict(const char *dictType);
@@ -19,7 +19,7 @@ diff -ur poppler-0.45.0.orig/poppler/Object.h poppler-0.45.0/poppler/Object.h
GBool isCmd(const char *cmdA)
{ return type == objCmd && !strcmp(cmd, cmdA); }
-@@ -243,7 +243,7 @@
+@@ -245,7 +245,7 @@
Object *dictGetValNF(int i, Object *obj);
// Stream accessors.
@@ -28,7 +28,7 @@ diff -ur poppler-0.45.0.orig/poppler/Object.h poppler-0.45.0/poppler/Object.h
void streamReset();
void streamClose();
int streamGetChar();
-@@ -347,10 +347,10 @@
+@@ -352,10 +352,10 @@
#include "Stream.h"
diff --git a/Build/source/libs/poppler/poppler-src/CMakeLists.txt b/Build/source/libs/poppler/poppler-src/CMakeLists.txt
index 34a5bdbc5e0..c90d0e89436 100644
--- a/Build/source/libs/poppler/poppler-src/CMakeLists.txt
+++ b/Build/source/libs/poppler/poppler-src/CMakeLists.txt
@@ -22,7 +22,7 @@ if (ECM_FOUND)
endif()
set(POPPLER_MAJOR_VERSION "0")
-set(POPPLER_MINOR_VERSION "45")
+set(POPPLER_MINOR_VERSION "46")
set(POPPLER_MICRO_VERSION "0")
set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
@@ -502,7 +502,7 @@ add_library(poppler STATIC ${poppler_SRCS})
else(MSVC)
add_library(poppler SHARED ${poppler_SRCS})
endif(MSVC)
-set_target_properties(poppler PROPERTIES VERSION 62.0.0 SOVERSION 62)
+set_target_properties(poppler PROPERTIES VERSION 63.0.0 SOVERSION 63)
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/Build/source/libs/poppler/poppler-src/ChangeLog b/Build/source/libs/poppler/poppler-src/ChangeLog
index e87511f5223..ee2a24b652b 100644
--- a/Build/source/libs/poppler/poppler-src/ChangeLog
+++ b/Build/source/libs/poppler/poppler-src/ChangeLog
@@ -1,3 +1,320 @@
+commit 5641644f485b402cd906d3db73a22a00eb00489b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Jul 25 00:14:30 2016 +0200
+
+ Poppler 0.46
+
+ CMakeLists.txt | 4 ++--
+ NEWS | 33 +++++++++++++++++++++++++++++++++
+ configure.ac | 2 +-
+ cpp/CMakeLists.txt | 2 +-
+ cpp/Doxyfile | 2 +-
+ cpp/Makefile.am | 2 +-
+ glib/CMakeLists.txt | 2 +-
+ glib/Makefile.am | 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 +-
+ 15 files changed, 48 insertions(+), 15 deletions(-)
+
+commit 97375143f458a9f12009d798ec43364d548051b9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jul 24 23:59:09 2016 +0200
+
+ update Copyrights
+
+ poppler/CairoOutputDev.cc | 2 +-
+ poppler/CairoOutputDev.h | 2 +-
+ poppler/Link.cc | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+commit bc1e3df84adff679194c33ce2dc52caa70b24df8
+Author: Richard Palo <richard@netbsd.org>
+Date: Sun Jul 24 23:52:52 2016 +0200
+
+ Work with non gnu greps
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit df6904366d587133760adf0d43a128aa4d35a712
+Author: Jakub Kucharski <jakubkucharski97@gmail.com>
+Date: Sun Jul 24 13:14:39 2016 +0200
+
+ qt5: fix memory leaks in Document::modificationDate() and
+ Document::creationDate()
+
+ qt5/src/poppler-document.cc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+commit d89ea6ae0ddd70916700a402649a9e0423ae9fbb
+Author: Jakub Kucharski <jakubkucharski97@gmail.com>
+Date: Sun Jul 24 13:14:19 2016 +0200
+
+ qt4: fix memory leaks in Document::modificationDate() and
+ Document::creationDate()
+
+ qt4/src/poppler-document.cc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+commit 844ede567f188997bb49ab1fc435797b4f31f5e9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jul 24 12:47:21 2016 +0200
+
+ qt5: Fix memory leak in new implementation of ::date
+
+ qt5/src/poppler-document.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit d34ac7cedf4213020f5a4c05e09aa8d781bc6e43
+Author: Jakub Kucharski <jakubkucharski97@gmail.com>
+Date: Sun Jul 24 12:43:41 2016 +0200
+
+ qt5: Added document property setters & getters
+
+ Part of Bug #36653
+
+ qt5/src/poppler-document.cc | 234
+ ++++++++++++++++++++++++++++++++++++--------
+ qt5/src/poppler-private.cc | 9 ++
+ qt5/src/poppler-private.h | 3 +
+ qt5/src/poppler-qt5.h | 118 ++++++++++++++++++++++
+ 4 files changed, 321 insertions(+), 43 deletions(-)
+
+commit 720718739c8002304e8da33d9ca87bc0c1511425
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jul 24 12:40:04 2016 +0200
+
+ qt4: Fix memory leak in new implementation of ::date
+
+ qt4/src/poppler-document.cc | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit e7cbc36467dfac9415d7d1cac70b77e04566e75d
+Author: Jakub Kucharski <jakubkucharski97@gmail.com>
+Date: Sun Jul 24 12:39:34 2016 +0200
+
+ qt4: Added document property setters & getters
+
+ Part of Bug #36653
+
+ qt4/src/poppler-document.cc | 234
+ ++++++++++++++++++++++++++++++++++++--------
+ qt4/src/poppler-private.cc | 9 ++
+ qt4/src/poppler-private.h | 3 +
+ qt4/src/poppler-qt4.h | 118 ++++++++++++++++++++++
+ 4 files changed, 321 insertions(+), 43 deletions(-)
+
+commit 977669048b93e0561fc86e15b42ac69884e36fab
+Author: Jakub Kucharski <jakubkucharski97@gmail.com>
+Date: Sun Jul 24 12:20:58 2016 +0200
+
+ cpp: Added document property setters & getters
+
+ Part of Bug #36653
+
+ cpp/poppler-document.cpp | 445
+ ++++++++++++++++++++++++++++++++++++++++++++---
+ cpp/poppler-document.h | 24 +++
+ 2 files changed, 447 insertions(+), 22 deletions(-)
+
+commit 7f4a201226bc1112a121c749eb73f2a78e5149e3
+Author: Jakub Kucharski <jakubkucharski97@gmail.com>
+Date: Sun Jul 24 12:19:52 2016 +0200
+
+ cpp: Added functions to save a document
+
+ Part of Bug #36653
+
+ cpp/poppler-document.cpp | 30 ++++++++++++++++++++++++++++++
+ cpp/poppler-document.h | 4 ++++
+ 2 files changed, 34 insertions(+)
+
+commit 8d5778feeb3c6cd932ecd7abeba7d1e670d2af66
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Tue Jul 19 22:58:39 2016 +0930
+
+ cairo: try finding glyphs in substitute fonts by unicode value
+
+ if the glyph name can not be found in the substitute font, try
+ converting the name to unicode value in see of the font cmap has a
+ mapping for the character.
+
+ Bug 96994
+
+ poppler/CairoFontEngine.cc | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+commit 954ee650047c185523f3e20e92f8fc4c67308196
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sun Jul 17 21:38:54 2016 +0930
+
+ pdftocairo: Use fprintf for printing errors
+
+ utils/pdftocairo.cc | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 92f283ba931b605935646e2c55007b75c7e82288
+Author: Jakub Kucharski <jakubkucharski97@gmail.com>
+Date: Sun Jul 17 01:42:19 2016 +0200
+
+ glib: make document metatag gobject properties writeable
+
+ glib/poppler-document.cc | 56
+ +++++++++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 48 insertions(+), 8 deletions(-)
+
+commit 13f0333a46e2a498700ee6bff9845ae0eceafe80
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Tue Jul 5 06:54:54 2016 +0930
+
+ pdfinfo: update man page for listenc, meta, js, and struct* options
+
+ utils/pdfinfo.1 | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit c91483aceb1b640771f572cb3df9ad707e5cad0d
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Mon Jul 4 21:55:53 2016 +0930
+
+ pdfinfo: Don't print pdf info when printing metadata, javascript,
+ or structure
+
+ Bug 96801
+
+ utils/pdfinfo.cc | 579
+ +++++++++++++++++++++++++++----------------------------
+ 1 file changed, 289 insertions(+), 290 deletions(-)
+
+commit 95d30fe3dd0cf265ccefd80d7deac00c7f430b14
+Author: Jakub Kucharski <jakubkucharski97@gmail.com>
+Date: Tue Jul 12 23:02:35 2016 +0200
+
+ cpp: pass len to GooString constructor in
+ detail::ustring_to_unicode_GooString()
+
+ Bug #96426
+
+ cpp/poppler-private.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 8a0b8b2ea57e3b9ac60e17e82aa22994f26d6213
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 5 23:35:57 2016 +0200
+
+ Be less strict when parsing FitH Link destinations
+
+ Would need the same for other kind of destinations too but since
+ don't have a file that needs it i'll refrain from changing it
+
+ Bug #96661
+
+ poppler/Link.cc | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+commit 7f893f546dd9753967b986d3a7a56becf9b8d02f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 5 23:30:29 2016 +0200
+
+ Remove checks that are already at the beginning of the function
+
+ poppler/Link.cc | 8 --------
+ 1 file changed, 8 deletions(-)
+
+commit 82476b0d6967ce5e61dce4666fe556edd63c16e6
+Author: Jakub Kucharski <jakubkucharski97@gmail.com>
+Date: Mon Jun 6 22:17:57 2016 +0200
+
+ glib: Added document property setters & simplified getters
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=36653
+
+ glib/poppler-document.cc | 347
+ +++++++++++++++++++++++++++---------
+ glib/poppler-document.h | 18 ++
+ glib/reference/poppler-docs.sgml | 4 +
+ glib/reference/poppler-sections.txt | 8 +
+ 4 files changed, 288 insertions(+), 89 deletions(-)
+
+commit 4f7c67b59b9c55b9b896378d3adbecbb73f6eb63
+Author: Jakub Kucharski <jakubkucharski97@gmail.com>
+Date: Tue Feb 23 16:46:43 2016 +0100
+
+ Added DocInfo setters & getters
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=36653
+
+ poppler/Object.h | 7 +++++-
+ poppler/PDFDoc.cc | 67
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/PDFDoc.h | 41 ++++++++++++++++++++++++++++++++++
+ poppler/XRef.cc | 34 ++++++++++++++++++++++++++++
+ poppler/XRef.h | 7 ++++++
+ 5 files changed, 155 insertions(+), 1 deletion(-)
+
+commit e2851dd8166fa5a1df0518959ad71c9d81bd9152
+Author: Jakub Kucharski <jakubkucharski97@gmail.com>
+Date: Tue Feb 23 15:36:43 2016 +0100
+
+ Added XRef modification flag
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=36653
+
+ poppler/PDFDoc.cc | 12 +-----------
+ poppler/XRef.cc | 5 +++++
+ poppler/XRef.h | 7 +++++++
+ 3 files changed, 13 insertions(+), 11 deletions(-)
+
+commit 9faa9b05171e46815924b48d31a7c45a1285c403
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sun Jun 5 22:44:56 2016 +0930
+
+ Fix tiling patterns with BBox with non-zero x,y
+
+ poppler/CairoOutputDev.cc | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+commit 500fb06a23c95109547fded267a21647c8629502
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Tue Jun 21 20:05:44 2016 +0930
+
+ Don't use -fPIC on cygwin
+
+ it emits a warning for every file stating that -fPIC is ignored
+
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 5f939d683a8978cdfdb65a3471296bf9e5940055
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sun Jun 19 11:07:09 2016 +0930
+
+ pdftocairo: revert the use of groups for blending into white page
+
+ This was added in 853e949 but has since been found to cause
+ regressions eg the test case in bug 63587.
+
+ utils/pdftocairo.cc | 14 ++++++--------
+ 1 file changed, 6 insertions(+), 8 deletions(-)
+
+commit 5165c1a59332a0bc9da60a1a8d53dace039aae32
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sun Jun 19 11:19:24 2016 +0930
+
+ cairo: fix bug in setAntialias()
+
+ Was setting the member cairo instead of cr parameter. Also rename the
+ function to avoid confusion with the public setAntialias() and make it
+ static to prevent this type of bug in future.
+
+ poppler/CairoOutputDev.cc | 16 ++++++++--------
+ poppler/CairoOutputDev.h | 2 +-
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
commit dfbb98327cbbc173a63f5db36b6606a93e5166aa
Author: Albert Astals Cid <aacid@kde.org>
Date: Fri Jun 17 00:04:25 2016 +0200
diff --git a/Build/source/libs/poppler/poppler-src/NEWS b/Build/source/libs/poppler/poppler-src/NEWS
index d5762ab64e8..0a8ff445234 100644
--- a/Build/source/libs/poppler/poppler-src/NEWS
+++ b/Build/source/libs/poppler/poppler-src/NEWS
@@ -1,3 +1,36 @@
+Release 0.46.0
+ core:
+ * cairo: fix bug in setAntialias()
+ * cairo: Fix tiling patterns with BBox with non-zero x,y
+ * cairo: try finding glyphs in substitute fonts by unicode value. Bug #96994
+ * Added XRef modification flag
+ * Added DocInfo setters & getters
+ * Be less strict when parsing FitH Link destinations. Bug #96661
+
+ utils:
+ * pdftocairo: revert the use of groups for blending into white page
+ * pdftocairo: Use fprintf for printing errors
+ * pdfinfo: Don't print pdf info when printing metadata, javascript, or structure. Bug #96801
+
+ glib:
+ * Added document property setters & simplified getters
+ * make document metatag gobject properties writeable
+
+ cpp:
+ * pass len to GooString constructor in detail::ustring_to_unicode_GooString(). Bug #96426
+ * Added functions to save a document
+ * Added document property setters & getters
+
+ qt4:
+ * Added document property setters & simplified getters
+
+ qt5:
+ * Added document property setters & simplified getters
+
+ build system:
+ * configure: Don't use -fPIC on cygwin
+ * configure: Work with non gnu greps
+
Release 0.45.0
core:
* SplashOutputDev: Fix iccTransform + splashModeXBGR8
diff --git a/Build/source/libs/poppler/poppler-src/configure.ac b/Build/source/libs/poppler/poppler-src/configure.ac
index 7a1455d261c..f008e25c60c 100644
--- a/Build/source/libs/poppler/poppler-src/configure.ac
+++ b/Build/source/libs/poppler/poppler-src/configure.ac
@@ -1,5 +1,5 @@
m4_define([poppler_version_major],[0])
-m4_define([poppler_version_minor],[45])
+m4_define([poppler_version_minor],[46])
m4_define([poppler_version_micro],[0])
m4_define([poppler_version],[poppler_version_major.poppler_version_minor.poppler_version_micro])
@@ -772,7 +772,7 @@ if test x$enable_poppler_qt5 = xyes; then
AC_CHECK_TOOL(MOCQT5, moc)
AC_MSG_CHECKING([for Qt5 moc])
mocversion=`$MOCQT5 -v 2>&1`
- mocversiongrep=`echo $mocversion | grep "Qt 5\|moc 5"`
+ mocversiongrep=`echo $mocversion | grep -E "Qt 5|moc 5"`
if test x"$mocversiongrep" != x"$mocversion"; then
AC_MSG_RESULT([no])
# moc was not the qt5 one, try with moc-qt5
@@ -957,8 +957,8 @@ case "$enable_compile_warnings" in
esac
case "$host_os" in
- mingw*)
- # mingw prints "warning: -fPIC ignored for target (all code is position independent)"
+ mingw*|cygwin*)
+ # mingw and cygwin print "warning: -fPIC ignored for target (all code is position independent)"
# for every file
;;
*)
diff --git a/Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.cc b/Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.cc
index e13607f9cf3..6676f898ad7 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.cc
@@ -467,6 +467,11 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
if ((name = enc[i])) {
codeToGID[i] = FT_Get_Name_Index(face, (char*)name);
if (codeToGID[i] == 0) {
+ Unicode u;
+ u = globalParams->mapNameToUnicodeText (name);
+ codeToGID[i] = FT_Get_Char_Index (face, u);
+ }
+ if (codeToGID[i] == 0) {
name = GfxFont::getAlternateName(name);
if (name) {
codeToGID[i] = FT_Get_Name_Index(face, (char*)name);
diff --git a/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc b/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc
index 9f892b23b3e..bd18cdeebac 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc
@@ -20,7 +20,7 @@
// Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
// Copyright (C) 2006-2011, 2013, 2014 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2008 Carl Worth <cworth@cworth.org>
-// Copyright (C) 2008-2015 Adrian Johnson <ajohnson@redneon.com>
+// Copyright (C) 2008-2016 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
// Copyright (C) 2008, 2009 Chris Wilson <chris@chris-wilson.co.uk>
// Copyright (C) 2008, 2012 Hib Eris <hib@hiberis.nl>
@@ -206,7 +206,7 @@ void CairoOutputDev::setCairo(cairo_t *cairo)
/* save the initial matrix so that we can use it for type3 fonts. */
//XXX: is this sufficient? could we miss changes to the matrix somehow?
cairo_get_matrix(cairo, &orig_matrix);
- setAntialias(cairo, antialias);
+ setContextAntialias(cairo, antialias);
} else {
this->cairo = NULL;
this->cairo_shape = NULL;
@@ -233,15 +233,15 @@ void CairoOutputDev::setAntialias(cairo_antialias_t antialias)
{
this->antialias = antialias;
if (cairo)
- setAntialias (cairo, antialias);
+ setContextAntialias (cairo, antialias);
if (cairo_shape)
- setAntialias (cairo_shape, antialias);
+ setContextAntialias (cairo_shape, antialias);
}
-void CairoOutputDev::setAntialias(cairo_t *cr, cairo_antialias_t antialias)
+void CairoOutputDev::setContextAntialias(cairo_t *cr, cairo_antialias_t antialias)
{
cairo_font_options_t *font_options;
- cairo_set_antialias (cairo, antialias);
+ cairo_set_antialias (cr, antialias);
font_options = cairo_font_options_create ();
cairo_get_font_options (cr, font_options);
cairo_font_options_set_antialias (font_options, antialias);
@@ -900,6 +900,7 @@ GBool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat
cairo_t *old_cairo;
double xMin, yMin, xMax, yMax;
double width, height;
+ double scaleX, scaleY;
int surface_width, surface_height;
StrokePathClip *strokePathTmp;
GBool adjusted_stroke_width_tmp;
@@ -924,6 +925,8 @@ GBool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat
double heightX = 0, heightY = height;
cairo_matrix_transform_distance (&matrix, &heightX, &heightY);
surface_height = ceil (sqrt (heightX * heightX + heightY * heightY));
+ scaleX = surface_width / width;
+ scaleY = surface_height / height;
surface = cairo_surface_create_similar (cairo_get_target (cairo),
CAIRO_CONTENT_COLOR_ALPHA,
@@ -934,11 +937,13 @@ GBool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat
old_cairo = cairo;
cairo = cairo_create (surface);
cairo_surface_destroy (surface);
- setAntialias(cairo, antialias);
- cairo_scale (cairo, surface_width / width, surface_height / height);
+ setContextAntialias(cairo, antialias);
box.x1 = bbox[0]; box.y1 = bbox[1];
box.x2 = bbox[2]; box.y2 = bbox[3];
+ cairo_scale (cairo, scaleX, scaleY);
+ cairo_translate (cairo, -box.x1, -box.y1);
+
strokePathTmp = strokePathClip;
strokePathClip = NULL;
adjusted_stroke_width_tmp = adjusted_stroke_width;
@@ -964,7 +969,8 @@ GBool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat
state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax);
cairo_rectangle (cairo, xMin, yMin, xMax - xMin, yMax - yMin);
- cairo_matrix_init_scale (&matrix, surface_width / width, surface_height / height);
+ cairo_matrix_init_scale (&matrix, scaleX, scaleY);
+ cairo_matrix_translate (&matrix, -box.x1, -box.y1);
cairo_pattern_set_matrix (pattern, &matrix);
cairo_transform (cairo, &pattern_matrix);
@@ -1633,7 +1639,7 @@ void CairoOutputDev::beginTransparencyGroup(GfxState * /*state*/, double * /*bbo
cairo_surface_t *cairo_shape_surface = cairo_surface_create_similar_clip (cairo, CAIRO_CONTENT_ALPHA);
cairo_shape = cairo_create (cairo_shape_surface);
cairo_surface_destroy (cairo_shape_surface);
- setAntialias(cairo_shape, antialias);
+ setContextAntialias(cairo_shape, antialias);
/* the color doesn't matter as long as it is opaque */
cairo_set_source_rgb (cairo_shape, 0, 0, 0);
@@ -1788,7 +1794,7 @@ void CairoOutputDev::setSoftMask(GfxState * state, double * bbox, GBool alpha,
cairo_surface_t *source = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
cairo_t *maskCtx = cairo_create(source);
- setAntialias(maskCtx, antialias);
+ setContextAntialias(maskCtx, antialias);
//XXX: hopefully this uses the correct color space */
if (!alpha && groupColorSpaceStack->cs) {
diff --git a/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.h b/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.h
index 3a6dbfa4648..4a1cd9918e2 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.h
+++ b/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.h
@@ -18,7 +18,7 @@
// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
// Copyright (C) 2006-2011, 2013 Carlos Garcia Campos <carlosgc@gnome.org>
-// Copyright (C) 2008, 2009, 2011-2015 Adrian Johnson <ajohnson@redneon.com>
+// Copyright (C) 2008, 2009, 2011-2016 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
// Copyright (C) 2010-2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2015 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
@@ -289,7 +289,7 @@ protected:
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
GBool setMimeDataForJBIG2Globals (Stream *str, cairo_surface_t *image);
#endif
- void setAntialias(cairo_t *cr, cairo_antialias_t antialias);
+ static void setContextAntialias(cairo_t *cr, cairo_antialias_t antialias);
GfxRGB fill_color, stroke_color;
cairo_pattern_t *fill_pattern, *stroke_pattern;
diff --git a/Build/source/libs/poppler/poppler-src/poppler/Link.cc b/Build/source/libs/poppler/poppler-src/poppler/Link.cc
index 4ab5f52ceda..d4680dbc54d 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/Link.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/Link.cc
@@ -16,7 +16,7 @@
// Copyright (C) 2006, 2008 Pino Toscano <pino@kde.org>
// Copyright (C) 2007, 2010, 2011 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
-// Copyright (C) 2008-2010, 2012-2014 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2008-2010, 2012-2014, 2016 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// Copyright (C) 2009 Ilya Gorenbein <igorenbein@finjan.com>
// Copyright (C) 2012 Tobias Koening <tobias.koenig@kdab.com>
@@ -231,30 +231,26 @@ LinkDest::LinkDest(Array *a) {
// Fit link
} else if (obj1.isName("Fit")) {
- if (a->getLength() < 2) {
- error(errSyntaxWarning, -1, "Annotation destination array is too short");
- goto err2;
- }
kind = destFit;
// FitH link
} else if (obj1.isName("FitH")) {
- if (a->getLength() < 3) {
- error(errSyntaxWarning, -1, "Annotation destination array is too short");
- goto err2;
- }
kind = destFitH;
- a->get(2, &obj2);
- if (obj2.isNull()) {
+ if (a->getLength() < 3) {
changeTop = gFalse;
- } else if (obj2.isNum()) {
- changeTop = gTrue;
- top = obj2.getNum();
} else {
- error(errSyntaxWarning, -1, "Bad annotation destination position");
- kind = destFit;
+ a->get(2, &obj2);
+ if (obj2.isNull()) {
+ changeTop = gFalse;
+ } else if (obj2.isNum()) {
+ changeTop = gTrue;
+ top = obj2.getNum();
+ } else {
+ error(errSyntaxWarning, -1, "Bad annotation destination position");
+ kind = destFit;
+ }
+ obj2.free();
}
- obj2.free();
// FitV link
} else if (obj1.isName("FitV")) {
@@ -313,10 +309,6 @@ LinkDest::LinkDest(Array *a) {
// FitB link
} else if (obj1.isName("FitB")) {
- if (a->getLength() < 2) {
- error(errSyntaxWarning, -1, "Annotation destination array is too short");
- goto err2;
- }
kind = destFitB;
// FitBH link
diff --git a/Build/source/libs/poppler/poppler-src/poppler/Makefile.am b/Build/source/libs/poppler/poppler-src/poppler/Makefile.am
index 3d32e792f94..26cc82c61c0 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/Makefile.am
+++ b/Build/source/libs/poppler/poppler-src/poppler/Makefile.am
@@ -327,7 +327,7 @@ libpoppler_la_LIBADD = \
$(win32_libs)
libpoppler_la_LDFLAGS = \
- -version-info 62:0:0 \
+ -version-info 63:0:0 \
@create_shared_lib@ \
@auto_import_flags@
diff --git a/Build/source/libs/poppler/poppler-src/poppler/Object.h b/Build/source/libs/poppler/poppler-src/poppler/Object.h
index c8fda624d8c..048f95a2451 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/Object.h
+++ b/Build/source/libs/poppler/poppler-src/poppler/Object.h
@@ -21,6 +21,7 @@
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2013 Adrian Perez de Castro <aperez@igalia.com>
+// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97@gmail.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
@@ -235,6 +236,7 @@ public:
int dictGetLength();
void dictAdd(char *key, Object *val);
void dictSet(const char *key, Object *val);
+ void dictRemove(const char *key);
GBool dictIs(const char *dictType);
Object *dictLookup(const char *key, Object *obj, int recursion = 0);
Object *dictLookupNF(const char *key, Object *obj);
@@ -318,7 +320,10 @@ inline void Object::dictAdd(char *key, Object *val)
{ OBJECT_TYPE_CHECK(objDict); dict->add(key, val); }
inline void Object::dictSet(const char *key, Object *val)
- { OBJECT_TYPE_CHECK(objDict); dict->set(key, val); }
+ { OBJECT_TYPE_CHECK(objDict); dict->set(key, val); }
+
+inline void Object::dictRemove(const char *key)
+ { OBJECT_TYPE_CHECK(objDict); dict->remove(key); }
inline GBool Object::dictIs(const char *dictType)
{ OBJECT_TYPE_CHECK(objDict); return dict->is(dictType); }
diff --git a/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc b/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc
index 9fc43e53b7e..c91d6e440e7 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc
@@ -34,6 +34,7 @@
// Copyright (C) 2015 Li Junling <lijunling@sina.com>
// Copyright (C) 2015 André Guerreiro <aguerreiro1985@gmail.com>
// Copyright (C) 2015 André Esser <bepandre@hotmail.com>
+// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97@gmail.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
@@ -600,6 +601,72 @@ GBool PDFDoc::isLinearized(GBool tryingToReconstruct) {
}
}
+void PDFDoc::setDocInfoModified(Object *infoObj)
+{
+ Object infoObjRef;
+ getDocInfoNF(&infoObjRef);
+ xref->setModifiedObject(infoObj, infoObjRef.getRef());
+ infoObjRef.free();
+}
+
+void PDFDoc::setDocInfoStringEntry(const char *key, GooString *value)
+{
+ GBool removeEntry = !value || value->getLength() == 0;
+
+ Object infoObj;
+ getDocInfo(&infoObj);
+
+ if (infoObj.isNull() && removeEntry) {
+ // No info dictionary, so no entry to remove.
+ return;
+ }
+
+ createDocInfoIfNoneExists(&infoObj);
+
+ Object gooStrObj;
+ if (removeEntry) {
+ gooStrObj.initNull();
+ } else {
+ gooStrObj.initString(value);
+ }
+
+ // gooStrObj is set to value or null by now. The latter will cause a removal.
+ infoObj.dictSet(key, &gooStrObj);
+
+ if (infoObj.dictGetLength() == 0) {
+ // Info dictionary is empty. Remove it altogether.
+ removeDocInfo();
+ } else {
+ setDocInfoModified(&infoObj);
+ }
+
+ infoObj.free();
+}
+
+GooString *PDFDoc::getDocInfoStringEntry(const char *key) {
+ Object infoObj;
+ getDocInfo(&infoObj);
+ if (infoObj.isNull()) {
+ return NULL;
+ }
+
+ Object entryObj;
+ infoObj.dictLookup(key, &entryObj);
+
+ GooString *result;
+
+ if (entryObj.isString()) {
+ result = entryObj.takeString();
+ } else {
+ result = NULL;
+ }
+
+ entryObj.free();
+ infoObj.free();
+
+ return result;
+}
+
static GBool
get_id (GooString *encodedidstring, GooString *id) {
const char *encodedid = encodedidstring->getCString();
@@ -865,17 +932,7 @@ int PDFDoc::saveAs(GooString *name, PDFWriteMode mode) {
}
int PDFDoc::saveAs(OutStream *outStr, PDFWriteMode mode) {
-
- // find if we have updated objects
- GBool updated = gFalse;
- for(int i=0; i<xref->getNumObjects(); i++) {
- if (xref->getEntry(i)->getFlag(XRefEntry::Updated)) {
- updated = gTrue;
- break;
- }
- }
-
- if (!updated && mode == writeStandard) {
+ if (!xref->isModified() && mode == writeStandard) {
// simply copy the original file
saveWithoutChangesAs (outStr);
} else if (mode == writeForceRewrite) {
diff --git a/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h b/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h
index 3a65ecb85ec..daff3f48f74 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h
+++ b/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h
@@ -29,6 +29,7 @@
// Copyright (C) 2013 Adrian Perez de Castro <aperez@igalia.com>
// Copyright (C) 2015 André Guerreiro <aguerreiro1985@gmail.com>
// Copyright (C) 2015 André Esser <bepandre@hotmail.com>
+// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97@gmail.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
@@ -231,6 +232,43 @@ public:
Object *getDocInfo(Object *obj) { return xref->getDocInfo(obj); }
Object *getDocInfoNF(Object *obj) { return xref->getDocInfoNF(obj); }
+ // Create and return the document's Info dictionary if none exists.
+ // Otherwise return the existing one.
+ Object *createDocInfoIfNoneExists(Object *obj) { return xref->createDocInfoIfNoneExists(obj); }
+
+ // Remove the document's Info dictionary and update the trailer dictionary.
+ void removeDocInfo() { xref->removeDocInfo(); }
+
+ // Set doc info string entry. NULL or empty value will cause a removal.
+ // Takes ownership of value.
+ void setDocInfoStringEntry(const char *key, GooString *value);
+
+ // Set document's properties in document's Info dictionary.
+ // NULL or empty value will cause a removal.
+ // Takes ownership of value.
+ void setDocInfoTitle(GooString *title) { setDocInfoStringEntry("Title", title); }
+ void setDocInfoAuthor(GooString *author) { setDocInfoStringEntry("Author", author); }
+ void setDocInfoSubject(GooString *subject) { setDocInfoStringEntry("Subject", subject); }
+ void setDocInfoKeywords(GooString *keywords) { setDocInfoStringEntry("Keywords", keywords); }
+ void setDocInfoCreator(GooString *creator) { setDocInfoStringEntry("Creator", creator); }
+ void setDocInfoProducer(GooString *producer) { setDocInfoStringEntry("Producer", producer); }
+ void setDocInfoCreatDate(GooString *creatDate) { setDocInfoStringEntry("CreationDate", creatDate); }
+ void setDocInfoModDate(GooString *modDate) { setDocInfoStringEntry("ModDate", modDate); }
+
+ // Get document's properties from document's Info dictionary.
+ // Returns NULL on fail.
+ // Returned GooStrings should be freed by the caller.
+ GooString *getDocInfoStringEntry(const char *key);
+
+ GooString *getDocInfoTitle() { return getDocInfoStringEntry("Title"); }
+ GooString *getDocInfoAuthor() { return getDocInfoStringEntry("Author"); }
+ GooString *getDocInfoSubject() { return getDocInfoStringEntry("Subject"); }
+ GooString *getDocInfoKeywords() { return getDocInfoStringEntry("Keywords"); }
+ GooString *getDocInfoCreator() { return getDocInfoStringEntry("Creator"); }
+ GooString *getDocInfoProducer() { return getDocInfoStringEntry("Producer"); }
+ GooString *getDocInfoCreatDate() { return getDocInfoStringEntry("CreationDate"); }
+ GooString *getDocInfoModDate() { return getDocInfoStringEntry("ModDate"); }
+
// Return the PDF version specified by the file.
int getPDFMajorVersion() { return pdfMajorVersion; }
int getPDFMinorVersion() { return pdfMinorVersion; }
@@ -315,6 +353,9 @@ private:
Goffset getMainXRefEntriesOffset(GBool tryingToReconstruct = gFalse);
long long strToLongLong(char *s);
+ // Mark the document's Info dictionary as modified.
+ void setDocInfoModified(Object *infoObj);
+
GooString *fileName;
#ifdef _WIN32
wchar_t *fileNameU;
diff --git a/Build/source/libs/poppler/poppler-src/poppler/XRef.cc b/Build/source/libs/poppler/poppler-src/poppler/XRef.cc
index 3d032bcb41f..f88c632cf03 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/XRef.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/XRef.cc
@@ -24,6 +24,7 @@
// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it>
// Copyright (C) 2013, 2014 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2013 Pino Toscano <pino@kde.org>
+// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97@gmail.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
@@ -286,6 +287,7 @@ void XRef::init() {
entries = NULL;
capacity = 0;
size = 0;
+ modified = gFalse;
streamEnds = NULL;
streamEndsLen = 0;
objStrs = new PopplerCache(5);
@@ -1290,6 +1292,40 @@ Object *XRef::getDocInfoNF(Object *obj) {
return trailerDict.dictLookupNF("Info", obj);
}
+Object *XRef::createDocInfoIfNoneExists(Object *obj) {
+ getDocInfo(obj);
+
+ if (!obj->isNull()) {
+ return obj;
+ }
+
+ obj->initDict(this);
+
+ Ref ref = addIndirectObject(obj);
+
+ Object objRef;
+ objRef.initRef(ref.num, ref.gen);
+
+ trailerDict.dictSet("Info", &objRef);
+
+ objRef.free();
+
+ return obj;
+}
+
+void XRef::removeDocInfo() {
+ Object infoObjRef;
+ getDocInfoNF(&infoObjRef);
+ if (infoObjRef.isNull()) {
+ return;
+ }
+
+ trailerDict.dictRemove("Info");
+
+ removeIndirectObject(infoObjRef.getRef());
+ infoObjRef.free();
+}
+
GBool XRef::getStreamEnd(Goffset streamStart, Goffset *streamEnd) {
int a, b, m;
@@ -1373,6 +1409,7 @@ void XRef::setModifiedObject (Object* o, Ref r) {
e->obj.free();
o->copy(&(e->obj));
e->setFlag(XRefEntry::Updated, gTrue);
+ setModified();
}
Ref XRef::addIndirectObject (Object* o) {
@@ -1398,6 +1435,7 @@ Ref XRef::addIndirectObject (Object* o) {
e->type = xrefEntryUncompressed;
o->copy(&e->obj);
e->setFlag(XRefEntry::Updated, gTrue);
+ setModified();
Ref r;
r.num = entryIndexToUse;
@@ -1419,6 +1457,7 @@ void XRef::removeIndirectObject(Ref r) {
e->type = xrefEntryFree;
e->gen++;
e->setFlag(XRefEntry::Updated, gTrue);
+ setModified();
}
void XRef::writeXRef(XRef::XRefWriter *writer, GBool writeAllEntries) {
diff --git a/Build/source/libs/poppler/poppler-src/poppler/XRef.h b/Build/source/libs/poppler/poppler-src/poppler/XRef.h
index 8748cb49906..245b14b8621 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/XRef.h
+++ b/Build/source/libs/poppler/poppler-src/poppler/XRef.h
@@ -22,6 +22,7 @@
// Copyright (C) 2012, 2013, 2016 Thomas Freitag <Thomas.Freitag@kabelmail.de>
// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it>
// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com>
+// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97@gmail.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
@@ -149,6 +150,13 @@ public:
Object *getDocInfo(Object *obj);
Object *getDocInfoNF(Object *obj);
+ // Create and return the document's Info dictionary if none exists.
+ // Otherwise return the existing one.
+ Object *createDocInfoIfNoneExists(Object *obj);
+
+ // Remove the document's Info dictionary and update the trailer dictionary.
+ void removeDocInfo();
+
// Return the number of objects in the xref table.
int getNumObjects() { return size; }
@@ -175,6 +183,11 @@ public:
XRefEntry *getEntry(int i, GBool complainIfMissing = gTrue);
Object *getTrailerDict() { return &trailerDict; }
+ // Was the XRef modified?
+ GBool isModified() { return modified; }
+ // Set the modification flag for XRef to true.
+ void setModified() { modified = gTrue; }
+
// Write access
void setModifiedObject(Object* o, Ref r);
Ref addIndirectObject (Object* o);
@@ -203,6 +216,7 @@ private:
int errCode; // error code (if <ok> is false)
GBool xrefReconstructed; // marker, true if xref was already reconstructed
Object trailerDict; // trailer dictionary
+ GBool modified;
Goffset *streamEnds; // 'endstream' positions - only used in
// damaged files
int streamEndsLen; // number of valid entries in streamEnds
diff --git a/Build/source/libs/poppler/version.ac b/Build/source/libs/poppler/version.ac
index a373074d143..ccc1b1705ce 100644
--- a/Build/source/libs/poppler/version.ac
+++ b/Build/source/libs/poppler/version.ac
@@ -8,4 +8,4 @@ dnl
dnl --------------------------------------------------------
dnl
dnl m4-include this file to define the current poppler version
-m4_define([poppler_version], [0.45.0])
+m4_define([poppler_version], [0.46.0])