texlive[41757] Build/source/libs: poppler 0.46.0

commits+kakuto at tug.org commits+kakuto at tug.org
Mon Jul 25 05:30:45 CEST 2016


Revision: 41757
          http://tug.org/svn/texlive?view=revision&revision=41757
Author:   kakuto
Date:     2016-07-25 05:30:45 +0200 (Mon, 25 Jul 2016)
Log Message:
-----------
poppler 0.46.0

Modified Paths:
--------------
    trunk/Build/source/libs/README
    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/poppler/CairoFontEngine.cc
    trunk/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc
    trunk/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.h
    trunk/Build/source/libs/poppler/poppler-src/poppler/Link.cc
    trunk/Build/source/libs/poppler/poppler-src/poppler/Makefile.am
    trunk/Build/source/libs/poppler/poppler-src/poppler/Object.h
    trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc
    trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h
    trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.cc
    trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.h
    trunk/Build/source/libs/poppler/version.ac

Modified: trunk/Build/source/libs/README
===================================================================
--- trunk/Build/source/libs/README	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/README	2016-07-25 03:30:45 UTC (rev 41757)
@@ -49,7 +49,7 @@
 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

Modified: trunk/Build/source/libs/poppler/ChangeLog
===================================================================
--- trunk/Build/source/libs/poppler/ChangeLog	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/ChangeLog	2016-07-25 03:30:45 UTC (rev 41757)
@@ -1,3 +1,8 @@
+2016-07-25  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	Import poppler-0.46.0.
+	* version.ac: Adjust.
+
 2016-06-18  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	Import poppler-0.45.0.

Modified: trunk/Build/source/libs/poppler/configure
===================================================================
--- trunk/Build/source/libs/poppler/configure	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/configure	2016-07-25 03:30:45 UTC (rev 41757)
@@ -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 at tug.org>.
 #
@@ -580,8 +580,8 @@
 # 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 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.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 @@
 
 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 @@
 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 @@
 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 @@
 
 # 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 @@
 
 
 cat >>confdefs.h <<_ACEOF
-#define POPPLER_VERSION "0.45.0"
+#define POPPLER_VERSION "0.46.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.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 @@
 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\\"
 

Modified: trunk/Build/source/libs/poppler/poppler-PATCHES/ChangeLog
===================================================================
--- trunk/Build/source/libs/poppler/poppler-PATCHES/ChangeLog	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-PATCHES/ChangeLog	2016-07-25 03:30:45 UTC (rev 41757)
@@ -1,3 +1,9 @@
+2016-07-25  Akira Kakuto  <kakuto at 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 at fuk.kindai.ac.jp>
 
 	Imported poppler-0.45.0 source tree from:

Modified: trunk/Build/source/libs/poppler/poppler-PATCHES/TL-Changes
===================================================================
--- trunk/Build/source/libs/poppler/poppler-PATCHES/TL-Changes	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-PATCHES/TL-Changes	2016-07-25 03:30:45 UTC (rev 41757)
@@ -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:

Modified: trunk/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX
===================================================================
--- trunk/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX	2016-07-25 03:30:45 UTC (rev 41757)
@@ -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
  

Modified: trunk/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions
===================================================================
--- trunk/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions	2016-07-25 03:30:45 UTC (rev 41757)
@@ -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 @@
      { 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 @@
    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 @@
    void streamReset();
    void streamClose();
    int streamGetChar();
-@@ -347,10 +347,10 @@
+@@ -352,10 +352,10 @@
  
  #include "Stream.h"
  

Modified: trunk/Build/source/libs/poppler/poppler-src/CMakeLists.txt
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/CMakeLists.txt	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/CMakeLists.txt	2016-07-25 03:30:45 UTC (rev 41757)
@@ -22,7 +22,7 @@
 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 @@
 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})
 

Modified: trunk/Build/source/libs/poppler/poppler-src/ChangeLog
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/ChangeLog	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/ChangeLog	2016-07-25 03:30:45 UTC (rev 41757)
@@ -1,3 +1,320 @@
+commit 5641644f485b402cd906d3db73a22a00eb00489b
+Author: Albert Astals Cid <aacid at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at kde.org>
 Date:   Fri Jun 17 00:04:25 2016 +0200

Modified: trunk/Build/source/libs/poppler/poppler-src/NEWS
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/NEWS	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/NEWS	2016-07-25 03:30:45 UTC (rev 41757)
@@ -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

Modified: trunk/Build/source/libs/poppler/poppler-src/configure.ac
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/configure.ac	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/configure.ac	2016-07-25 03:30:45 UTC (rev 41757)
@@ -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 @@
   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 @@
 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
     ;;
   *)

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.cc	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.cc	2016-07-25 03:30:45 UTC (rev 41757)
@@ -467,6 +467,11 @@
       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);

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc	2016-07-25 03:30:45 UTC (rev 41757)
@@ -20,7 +20,7 @@
 // Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev at yandex.ru>
 // Copyright (C) 2006-2011, 2013, 2014 Carlos Garcia Campos <carlosgc at gnome.org>
 // Copyright (C) 2008 Carl Worth <cworth at cworth.org>
-// Copyright (C) 2008-2015 Adrian Johnson <ajohnson at redneon.com>
+// Copyright (C) 2008-2016 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2008 Michael Vrable <mvrable at cs.ucsd.edu>
 // Copyright (C) 2008, 2009 Chris Wilson <chris at chris-wilson.co.uk>
 // Copyright (C) 2008, 2012 Hib Eris <hib at hiberis.nl>
@@ -206,7 +206,7 @@
 	/* 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 @@
 {
   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 @@
   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 @@
   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 @@
   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 @@
   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 @@
       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 @@
 
     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) {

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.h	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.h	2016-07-25 03:30:45 UTC (rev 41757)
@@ -18,7 +18,7 @@
 // Copyright (C) 2005, 2006 Kristian Høgsberg <krh at redhat.com>
 // Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev at yandex.ru>
 // Copyright (C) 2006-2011, 2013 Carlos Garcia Campos <carlosgc at gnome.org>
-// Copyright (C) 2008, 2009, 2011-2015 Adrian Johnson <ajohnson at redneon.com>
+// Copyright (C) 2008, 2009, 2011-2016 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2008 Michael Vrable <mvrable at cs.ucsd.edu>
 // Copyright (C) 2010-2013 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2015 Suzuki Toshiya <mpsuzuki at hiroshima-u.ac.jp>
@@ -289,7 +289,7 @@
 #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;

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/Link.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/Link.cc	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/Link.cc	2016-07-25 03:30:45 UTC (rev 41757)
@@ -16,7 +16,7 @@
 // Copyright (C) 2006, 2008 Pino Toscano <pino at kde.org>
 // Copyright (C) 2007, 2010, 2011 Carlos Garcia Campos <carlosgc at gnome.org>
 // Copyright (C) 2008 Hugo Mercier <hmercier31 at gmail.com>
-// Copyright (C) 2008-2010, 2012-2014 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2008-2010, 2012-2014, 2016 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2009 Kovid Goyal <kovid at kovidgoyal.net>
 // Copyright (C) 2009 Ilya Gorenbein <igorenbein at finjan.com>
 // Copyright (C) 2012 Tobias Koening <tobias.koenig at kdab.com>
@@ -231,30 +231,26 @@
 
   // 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")) {
+    kind = destFitH;
     if (a->getLength() < 3) {
-      error(errSyntaxWarning, -1, "Annotation destination array is too short");
-      goto err2;
-    }
-    kind = destFitH;
-    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;
+      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 @@
 
   // 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

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/Makefile.am
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/Makefile.am	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/Makefile.am	2016-07-25 03:30:45 UTC (rev 41757)
@@ -327,7 +327,7 @@
 	$(win32_libs)
 
 libpoppler_la_LDFLAGS =				\
-	-version-info 62:0:0			\
+	-version-info 63:0:0			\
 	@create_shared_lib@			\
 	@auto_import_flags@
 

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/Object.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/Object.h	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/Object.h	2016-07-25 03:30:45 UTC (rev 41757)
@@ -21,6 +21,7 @@
 // Copyright (C) 2013 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2013 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2013 Adrian Perez de Castro <aperez at igalia.com>
+// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97 at 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 @@
   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,8 +320,11 @@
   { 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); }
 

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc	2016-07-25 03:30:45 UTC (rev 41757)
@@ -34,6 +34,7 @@
 // Copyright (C) 2015 Li Junling <lijunling at sina.com>
 // Copyright (C) 2015 André Guerreiro <aguerreiro1985 at gmail.com>
 // Copyright (C) 2015 André Esser <bepandre at hotmail.com>
+// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97 at 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 @@
   }
 }
 
+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(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) {

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h	2016-07-25 03:30:45 UTC (rev 41757)
@@ -29,6 +29,7 @@
 // Copyright (C) 2013 Adrian Perez de Castro <aperez at igalia.com>
 // Copyright (C) 2015 André Guerreiro <aguerreiro1985 at gmail.com>
 // Copyright (C) 2015 André Esser <bepandre at hotmail.com>
+// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97 at 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 @@
   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 @@
   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;

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.cc	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.cc	2016-07-25 03:30:45 UTC (rev 41757)
@@ -24,6 +24,7 @@
 // Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso at hotmail.it>
 // Copyright (C) 2013, 2014 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2013 Pino Toscano <pino at kde.org>
+// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97 at 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 @@
   entries = NULL;
   capacity = 0;
   size = 0;
+  modified = gFalse;
   streamEnds = NULL;
   streamEndsLen = 0;
   objStrs = new PopplerCache(5);
@@ -1290,6 +1292,40 @@
   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 @@
   e->obj.free();
   o->copy(&(e->obj));
   e->setFlag(XRefEntry::Updated, gTrue);
+  setModified();
 }
 
 Ref XRef::addIndirectObject (Object* o) {
@@ -1398,6 +1435,7 @@
   e->type = xrefEntryUncompressed;
   o->copy(&e->obj);
   e->setFlag(XRefEntry::Updated, gTrue);
+  setModified();
 
   Ref r;
   r.num = entryIndexToUse;
@@ -1419,6 +1457,7 @@
   e->type = xrefEntryFree;
   e->gen++;
   e->setFlag(XRefEntry::Updated, gTrue);
+  setModified();
 }
 
 void XRef::writeXRef(XRef::XRefWriter *writer, GBool writeAllEntries) {

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.h	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.h	2016-07-25 03:30:45 UTC (rev 41757)
@@ -22,6 +22,7 @@
 // Copyright (C) 2012, 2013, 2016 Thomas Freitag <Thomas.Freitag at kabelmail.de>
 // Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso at hotmail.it>
 // Copyright (C) 2013 Adrian Johnson <ajohnson at redneon.com>
+// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97 at 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 @@
   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 @@
   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 @@
   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

Modified: trunk/Build/source/libs/poppler/version.ac
===================================================================
--- trunk/Build/source/libs/poppler/version.ac	2016-07-25 01:10:22 UTC (rev 41756)
+++ trunk/Build/source/libs/poppler/version.ac	2016-07-25 03:30:45 UTC (rev 41757)
@@ -8,4 +8,4 @@
 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])



More information about the tex-live-commits mailing list