diff options
39 files changed, 93 insertions, 65 deletions
@@ -1,3 +1,15 @@ +2014-01-14 Jay Berkenbilt <ejb@ql.org> + + * 5.1.1: release + +2013-12-26 Jay Berkenbilt <ejb@ql.org> + + * Bug fix: when copying foreign objects (which occurs during page + splitting among other cases), avoid traversing the same object + more than once if it appears more than once in the same direct + object. This bug is performance-only and does not affect the + actual output. + 2013-12-17 Jay Berkenbilt <ejb@ql.org> * 5.1.0: release @@ -2,7 +2,7 @@ This is the QPDF package. Information about it can be found at http://qpdf.sourceforge.net. The source code repository is hosted at github: https://github.com/qpdf/qpdf. -QPDF is copyright (c) 2005-2013 Jay Berkenbilt +QPDF is copyright (c) 2005-2014 Jay Berkenbilt This software may be distributed under the terms of version 2 of the Artistic License which may be found in the source distribution as diff --git a/README.maintainer b/README.maintainer index 646a9e6..42429f6 100644 --- a/README.maintainer +++ b/README.maintainer @@ -69,8 +69,8 @@ Release Reminders * Check TODO file to make sure all planned items for the release are done or retargeted. - * Each year, update copyright notices. Just search for Copyright. - Last updated: 2013. + * Each year, update copyright notices. Just do a case-insensitive + search for copyright. Last updated: 2014. * To construct a source distribution from a pristine checkout, make_dist does the following: @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for qpdf 5.1.0. +# Generated by GNU Autoconf 2.69 for qpdf 5.1.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='qpdf' PACKAGE_TARNAME='qpdf' -PACKAGE_VERSION='5.1.0' -PACKAGE_STRING='qpdf 5.1.0' +PACKAGE_VERSION='5.1.1' +PACKAGE_STRING='qpdf 5.1.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1313,7 +1313,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 qpdf 5.1.0 to adapt to many kinds of systems. +\`configure' configures qpdf 5.1.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1378,7 +1378,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of qpdf 5.1.0:";; + short | recursive ) echo "Configuration of qpdf 5.1.1:";; esac cat <<\_ACEOF @@ -1519,7 +1519,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -qpdf configure 5.1.0 +qpdf configure 5.1.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2059,7 +2059,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 qpdf $as_me 5.1.0, which was +It was created by qpdf $as_me 5.1.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -16612,7 +16612,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 qpdf $as_me 5.1.0, which was +This file was extended by qpdf $as_me 5.1.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16678,7 +16678,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="\\ -qpdf config.status 5.1.0 +qpdf config.status 5.1.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 4623ca0..b26f0fd 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. dnl This config.in requires autoconf 2.5 or greater. AC_PREREQ([2.68]) -AC_INIT([qpdf],[5.1.0]) +AC_INIT([qpdf],[5.1.1]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_FILES([autoconf.mk]) diff --git a/doc/qpdf-manual.html b/doc/qpdf-manual.html index e3dd1dc..f52b06d 100644 --- a/doc/qpdf-manual.html +++ b/doc/qpdf-manual.html @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>QPDF Manual</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /></head><body><div class="book"><div class="titlepage"><div><div><h1 class="title"><a id="idp41972176"></a>QPDF Manual</h1></div><div><h2 class="subtitle">For QPDF Version 5.1.0, December 17, 2013</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jay</span> <span class="surname">Berkenbilt</span></h3></div></div><div><p class="copyright">Copyright © 2005–2013 Jay Berkenbilt</p></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="preface"><a href="#acknowledgments">General Information</a></span></dt><dt><span class="chapter"><a href="#ref.overview">1. What is QPDF?</a></span></dt><dt><span class="chapter"><a href="#ref.installing">2. Building and Installing QPDF</a></span></dt><dd><dl><dt><span class="sect1"><a href="#ref.prerequisites">2.1. System Requirements</a></span></dt><dt><span class="sect1"><a href="#ref.building">2.2. Build Instructions</a></span></dt></dl></dd><dt><span class="chapter"><a href="#ref.using">3. Running QPDF</a></span></dt><dd><dl><dt><span class="sect1"><a href="#ref.invocation">3.1. Basic Invocation</a></span></dt><dt><span class="sect1"><a href="#ref.basic-options">3.2. Basic Options</a></span></dt><dt><span class="sect1"><a href="#ref.encryption-options">3.3. Encryption Options</a></span></dt><dt><span class="sect1"><a href="#ref.page-selection">3.4. Page Selection Options</a></span></dt><dt><span class="sect1"><a href="#ref.advanced-transformation">3.5. Advanced Transformation Options</a></span></dt><dt><span class="sect1"><a href="#ref.testing-options">3.6. Testing, Inspection, and Debugging Options</a></span></dt></dl></dd><dt><span class="chapter"><a href="#ref.qdf">4. QDF Mode</a></span></dt><dt><span class="chapter"><a href="#ref.using-library">5. Using the QPDF Library</a></span></dt><dt><span class="chapter"><a href="#ref.design">6. Design and Library Notes</a></span></dt><dd><dl><dt><span class="sect1"><a href="#ref.design.intro">6.1. Introduction</a></span></dt><dt><span class="sect1"><a href="#ref.design-goals">6.2. Design Goals</a></span></dt><dt><span class="sect1"><a href="#ref.casting">6.3. Casting Policy</a></span></dt><dt><span class="sect1"><a href="#ref.encryption">6.4. Encryption</a></span></dt><dt><span class="sect1"><a href="#ref.random-numbers">6.5. Random Number Generation</a></span></dt><dt><span class="sect1"><a href="#ref.adding-and-remove-pages">6.6. Adding and Removing Pages</a></span></dt><dt><span class="sect1"><a href="#ref.reserved-objects">6.7. Reserving Object Numbers</a></span></dt><dt><span class="sect1"><a href="#ref.foreign-objects">6.8. Copying Objects From Other PDF Files</a></span></dt><dt><span class="sect1"><a href="#ref.rewriting">6.9. Writing PDF Files</a></span></dt><dt><span class="sect1"><a href="#ref.filtered-streams">6.10. Filtered Streams</a></span></dt></dl></dd><dt><span class="chapter"><a href="#ref.linearization">7. Linearization</a></span></dt><dd><dl><dt><span class="sect1"><a href="#ref.linearization-strategy">7.1. Basic Strategy for Linearization</a></span></dt><dt><span class="sect1"><a href="#ref.linearized.preparation">7.2. Preparing For Linearization</a></span></dt><dt><span class="sect1"><a href="#ref.optimization">7.3. Optimization</a></span></dt><dt><span class="sect1"><a href="#ref.linearization.writing">7.4. Writing Linearized Files</a></span></dt><dt><span class="sect1"><a href="#ref.linearization-data">7.5. Calculating Linearization Data</a></span></dt><dt><span class="sect1"><a href="#ref.linearization-issues">7.6. Known Issues with Linearization</a></span></dt><dt><span class="sect1"><a href="#ref.linearization-debugging">7.7. Debugging Note</a></span></dt></dl></dd><dt><span class="chapter"><a href="#ref.object-and-xref-streams">8. Object and Cross-Reference Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="#ref.object-streams">8.1. Object Streams</a></span></dt><dt><span class="sect1"><a href="#ref.xref-streams">8.2. Cross-Reference Streams</a></span></dt><dd><dl><dt><span class="sect2"><a href="#ref.xref-stream-data">8.2.1. Cross-Reference Stream Data</a></span></dt></dl></dd><dt><span class="sect1"><a href="#ref.object-streams-linearization">8.3. Implications for Linearized Files</a></span></dt><dt><span class="sect1"><a href="#ref.object-stream-implementation">8.4. Implementation Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="#ref.release-notes">A. Release Notes</a></span></dt><dt><span class="appendix"><a href="#ref.upgrading-to-2.1">B. Upgrading from 2.0 to 2.1</a></span></dt><dt><span class="appendix"><a href="#ref.upgrading-to-3.0">C. Upgrading to 3.0</a></span></dt><dt><span class="appendix"><a href="#ref.upgrading-to-4.0">D. Upgrading to 4.0</a></span></dt></dl></div><div class="preface"><div class="titlepage"><div><div><h1 class="title"><a id="acknowledgments"></a>General Information</h1></div></div></div><p> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>QPDF Manual</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /></head><body><div class="book"><div class="titlepage"><div><div><h1 class="title"><a id="idp42117520"></a>QPDF Manual</h1></div><div><h2 class="subtitle">For QPDF Version 5.1.1, December 17, 2014</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jay</span> <span class="surname">Berkenbilt</span></h3></div></div><div><p class="copyright">Copyright © 2005–2014 Jay Berkenbilt</p></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="preface"><a href="#acknowledgments">General Information</a></span></dt><dt><span class="chapter"><a href="#ref.overview">1. What is QPDF?</a></span></dt><dt><span class="chapter"><a href="#ref.installing">2. Building and Installing QPDF</a></span></dt><dd><dl><dt><span class="sect1"><a href="#ref.prerequisites">2.1. System Requirements</a></span></dt><dt><span class="sect1"><a href="#ref.building">2.2. Build Instructions</a></span></dt></dl></dd><dt><span class="chapter"><a href="#ref.using">3. Running QPDF</a></span></dt><dd><dl><dt><span class="sect1"><a href="#ref.invocation">3.1. Basic Invocation</a></span></dt><dt><span class="sect1"><a href="#ref.basic-options">3.2. Basic Options</a></span></dt><dt><span class="sect1"><a href="#ref.encryption-options">3.3. Encryption Options</a></span></dt><dt><span class="sect1"><a href="#ref.page-selection">3.4. Page Selection Options</a></span></dt><dt><span class="sect1"><a href="#ref.advanced-transformation">3.5. Advanced Transformation Options</a></span></dt><dt><span class="sect1"><a href="#ref.testing-options">3.6. Testing, Inspection, and Debugging Options</a></span></dt></dl></dd><dt><span class="chapter"><a href="#ref.qdf">4. QDF Mode</a></span></dt><dt><span class="chapter"><a href="#ref.using-library">5. Using the QPDF Library</a></span></dt><dt><span class="chapter"><a href="#ref.design">6. Design and Library Notes</a></span></dt><dd><dl><dt><span class="sect1"><a href="#ref.design.intro">6.1. Introduction</a></span></dt><dt><span class="sect1"><a href="#ref.design-goals">6.2. Design Goals</a></span></dt><dt><span class="sect1"><a href="#ref.casting">6.3. Casting Policy</a></span></dt><dt><span class="sect1"><a href="#ref.encryption">6.4. Encryption</a></span></dt><dt><span class="sect1"><a href="#ref.random-numbers">6.5. Random Number Generation</a></span></dt><dt><span class="sect1"><a href="#ref.adding-and-remove-pages">6.6. Adding and Removing Pages</a></span></dt><dt><span class="sect1"><a href="#ref.reserved-objects">6.7. Reserving Object Numbers</a></span></dt><dt><span class="sect1"><a href="#ref.foreign-objects">6.8. Copying Objects From Other PDF Files</a></span></dt><dt><span class="sect1"><a href="#ref.rewriting">6.9. Writing PDF Files</a></span></dt><dt><span class="sect1"><a href="#ref.filtered-streams">6.10. Filtered Streams</a></span></dt></dl></dd><dt><span class="chapter"><a href="#ref.linearization">7. Linearization</a></span></dt><dd><dl><dt><span class="sect1"><a href="#ref.linearization-strategy">7.1. Basic Strategy for Linearization</a></span></dt><dt><span class="sect1"><a href="#ref.linearized.preparation">7.2. Preparing For Linearization</a></span></dt><dt><span class="sect1"><a href="#ref.optimization">7.3. Optimization</a></span></dt><dt><span class="sect1"><a href="#ref.linearization.writing">7.4. Writing Linearized Files</a></span></dt><dt><span class="sect1"><a href="#ref.linearization-data">7.5. Calculating Linearization Data</a></span></dt><dt><span class="sect1"><a href="#ref.linearization-issues">7.6. Known Issues with Linearization</a></span></dt><dt><span class="sect1"><a href="#ref.linearization-debugging">7.7. Debugging Note</a></span></dt></dl></dd><dt><span class="chapter"><a href="#ref.object-and-xref-streams">8. Object and Cross-Reference Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="#ref.object-streams">8.1. Object Streams</a></span></dt><dt><span class="sect1"><a href="#ref.xref-streams">8.2. Cross-Reference Streams</a></span></dt><dd><dl><dt><span class="sect2"><a href="#ref.xref-stream-data">8.2.1. Cross-Reference Stream Data</a></span></dt></dl></dd><dt><span class="sect1"><a href="#ref.object-streams-linearization">8.3. Implications for Linearized Files</a></span></dt><dt><span class="sect1"><a href="#ref.object-stream-implementation">8.4. Implementation Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="#ref.release-notes">A. Release Notes</a></span></dt><dt><span class="appendix"><a href="#ref.upgrading-to-2.1">B. Upgrading from 2.0 to 2.1</a></span></dt><dt><span class="appendix"><a href="#ref.upgrading-to-3.0">C. Upgrading to 3.0</a></span></dt><dt><span class="appendix"><a href="#ref.upgrading-to-4.0">D. Upgrading to 4.0</a></span></dt></dl></div><div class="preface"><div class="titlepage"><div><div><h1 class="title"><a id="acknowledgments"></a>General Information</h1></div></div></div><p> QPDF is a program that does structural, content-preserving transformations on PDF files. QPDF's website is located at <a class="ulink" href="http://qpdf.sourceforge.net/" target="_top">http://qpdf.sourceforge.net/</a>. QPDF's source code is hosted on github at <a class="ulink" href="https://github.com/qpdf/qpdf" target="_top">https://github.com/qpdf/qpdf</a>. @@ -972,7 +972,7 @@ outfile.pdf</code> password-protected files. QPDF does not enforce encryption parameters and will treat user and owner passwords equivalently. Either password may be used to access an encrypted file. - <a href="#ftn.idp48144512" class="footnote" id="idp48144512"><sup class="footnote">[1]</sup></a> + <a href="#ftn.idp48289504" class="footnote" id="idp48289504"><sup class="footnote">[1]</sup></a> <code class="classname">QPDF</code> will allow recovery of a user password given an owner password. The input PDF file must be seekable. (Output files written by <code class="classname">QPDFWriter</code> need @@ -1450,7 +1450,7 @@ outfile.pdf</code> filter should write to whatever type of output is required. The <code class="classname">QPDF</code> class has an interface to write raw or filtered stream contents to a given pipeline. - </p></div><div class="footnotes"><br /><hr style="width:100; text-align:left;margin-left: 0" /><div id="ftn.idp48144512" class="footnote"><p><a href="#idp48144512" class="para"><sup class="para">[1] </sup></a> + </p></div><div class="footnotes"><br /><hr style="width:100; text-align:left;margin-left: 0" /><div id="ftn.idp48289504" class="footnote"><p><a href="#idp48289504" class="para"><sup class="para">[1] </sup></a> As pointed out earlier, the intention is not for qpdf to be used to bypass security on files. but as any open source PDF consumer may be easily modified to bypass basic PDF document security, @@ -1813,7 +1813,12 @@ print "\n"; </p></div></div><div class="appendix"><div class="titlepage"><div><div><h1 class="title"><a id="ref.release-notes"></a>Appendix A. Release Notes</h1></div></div></div><p> For a detailed list of changes, please see the file <code class="filename">ChangeLog</code> in the source distribution. - </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">5.1.0: December 17, 2013</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> + </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">5.1.1: January 14, 2014</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> + Performance fix: copying foreign objects could be very slow + with certain types of files. This was most likely to be + visible during page splitting and was due to traversing the + same objects multiple times in some cases. + </p></li></ul></div></dd><dt><span class="term">5.1.0: December 17, 2013</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> Added runtime option (<code class="function">QUtil::setRandomDataProvider</code>) to supply your own random data provider. You can use this if you want @@ -2110,7 +2115,7 @@ print "\n"; Fix the <span class="command"><strong>pkg-config</strong></span> files to list zlib and pcre in <code class="function">Requires.private</code> to better support static linking using <span class="command"><strong>pkg-config</strong></span>. - </p></li></ul></div></dd></dl></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">3.0.2: September 6, 2012</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> + </p></li></ul></div></dd><dt><span class="term">3.0.2: September 6, 2012</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> Bug fix: <code class="function">QPDFWriter::setOutputMemory</code> did not work when not used with <code class="function">QPDFWriter::setStaticID</code>, which made it @@ -2121,7 +2126,7 @@ print "\n"; additional text near the header of the PDF file. The intended use case is to insert comments that may be consumed by a downstream application, though other use cases may exist. - </p></li></ul></div></dd></dl></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">3.0.1: August 11, 2012</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> + </p></li></ul></div></dd><dt><span class="term">3.0.1: August 11, 2012</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> Version 3.0.0 included addition of files for <span class="command"><strong>pkg-config</strong></span>, but this was not mentioned in the release notes. The release notes for 3.0.0 were updated @@ -2131,7 +2136,7 @@ print "\n"; followed by space, qpdf would incorrectly report that it encountered a premature EOF. This bug has been in qpdf since version 2.0. - </p></li></ul></div></dd></dl></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">3.0.0: August 2, 2012</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> + </p></li></ul></div></dd><dt><span class="term">3.0.0: August 2, 2012</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> Acknowledgment: I would like to express gratitude for the contributions of Tobias Hoffmann toward the release of qpdf version 3.0. He is responsible for most of the implementation @@ -2225,7 +2230,7 @@ print "\n"; building with an autobuilder, you can add the <code class="option">--enable-show-failed-test-output</code> option to <span class="command"><strong>./configure</strong></span> to restore the old behavior. - </p></li></ul></div></dd></dl></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">2.3.1: December 28, 2011</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> + </p></li></ul></div></dd><dt><span class="term">2.3.1: December 28, 2011</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> Fix thread-safety problem resulting from non-thread-safe use of the PCRE library. </p></li><li class="listitem"><p> @@ -2275,7 +2280,7 @@ print "\n"; <code class="function">qpdf_get_buffer_length</code>, and <code class="function">qpdf_get_buffer</code> to the C API for writing PDF files to a memory buffer instead of a file. - </p></li></ul></div></dd></dl></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">2.2.4: June 25, 2011</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> + </p></li></ul></div></dd><dt><span class="term">2.2.4: June 25, 2011</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> Fix installation and compilation issues; no functionality changes. </p></li></ul></div></dd><dt><span class="term">2.2.3: April 30, 2011</span></dt><dd><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> diff --git a/doc/qpdf-manual.pdf b/doc/qpdf-manual.pdf Binary files differindex 2b07e5f..d39060a 100644 --- a/doc/qpdf-manual.pdf +++ b/doc/qpdf-manual.pdf diff --git a/include/qpdf/Buffer.hh b/include/qpdf/Buffer.hh index 22e1f34..e19bf1f 100644 --- a/include/qpdf/Buffer.hh +++ b/include/qpdf/Buffer.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/BufferInputSource.hh b/include/qpdf/BufferInputSource.hh index 222f71e..956a6ef 100644 --- a/include/qpdf/BufferInputSource.hh +++ b/include/qpdf/BufferInputSource.hh @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Jay Berkenbilt +/* Copyright (c) 2005-2014 Jay Berkenbilt * * This file is part of qpdf. This software may be distributed under * the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/Constants.h b/include/qpdf/Constants.h index 6d34020..e8e3396 100644 --- a/include/qpdf/Constants.h +++ b/include/qpdf/Constants.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Jay Berkenbilt +/* Copyright (c) 2005-2014 Jay Berkenbilt * * This file is part of qpdf. This software may be distributed under * the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/DLL.h b/include/qpdf/DLL.h index c2c85dc..d570b99 100644 --- a/include/qpdf/DLL.h +++ b/include/qpdf/DLL.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Jay Berkenbilt +/* Copyright (c) 2005-2014 Jay Berkenbilt * * This file is part of qpdf. This software may be distributed under * the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/FileInputSource.hh b/include/qpdf/FileInputSource.hh index 001af17..a298a2b 100644 --- a/include/qpdf/FileInputSource.hh +++ b/include/qpdf/FileInputSource.hh @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Jay Berkenbilt +/* Copyright (c) 2005-2014 Jay Berkenbilt * * This file is part of qpdf. This software may be distributed under * the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/InputSource.hh b/include/qpdf/InputSource.hh index 510daac..1f66493 100644 --- a/include/qpdf/InputSource.hh +++ b/include/qpdf/InputSource.hh @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Jay Berkenbilt +/* Copyright (c) 2005-2014 Jay Berkenbilt * * This file is part of qpdf. This software may be distributed under * the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/Pipeline.hh b/include/qpdf/Pipeline.hh index aa86003..79c0c9b 100644 --- a/include/qpdf/Pipeline.hh +++ b/include/qpdf/Pipeline.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/Pl_Buffer.hh b/include/qpdf/Pl_Buffer.hh index 3019181..3fc6f05 100644 --- a/include/qpdf/Pl_Buffer.hh +++ b/include/qpdf/Pl_Buffer.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/Pl_Concatenate.hh b/include/qpdf/Pl_Concatenate.hh index 568eb04..6832487 100644 --- a/include/qpdf/Pl_Concatenate.hh +++ b/include/qpdf/Pl_Concatenate.hh @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Jay Berkenbilt +/* Copyright (c) 2005-2014 Jay Berkenbilt * * This file is part of qpdf. This software may be distributed under * the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/Pl_Count.hh b/include/qpdf/Pl_Count.hh index d44e688..229ecd3 100644 --- a/include/qpdf/Pl_Count.hh +++ b/include/qpdf/Pl_Count.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/Pl_Discard.hh b/include/qpdf/Pl_Discard.hh index 3110b45..39db192 100644 --- a/include/qpdf/Pl_Discard.hh +++ b/include/qpdf/Pl_Discard.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/Pl_Flate.hh b/include/qpdf/Pl_Flate.hh index 188a79b..24780a9 100644 --- a/include/qpdf/Pl_Flate.hh +++ b/include/qpdf/Pl_Flate.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/Pl_StdioFile.hh b/include/qpdf/Pl_StdioFile.hh index f91e572..19e73a1 100644 --- a/include/qpdf/Pl_StdioFile.hh +++ b/include/qpdf/Pl_StdioFile.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/PointerHolder.hh b/include/qpdf/PointerHolder.hh index a1f756b..0f2ffa5 100644 --- a/include/qpdf/PointerHolder.hh +++ b/include/qpdf/PointerHolder.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index e30e467..dfce40c 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/QPDFExc.hh b/include/qpdf/QPDFExc.hh index 11e6cfe..191c84e 100644 --- a/include/qpdf/QPDFExc.hh +++ b/include/qpdf/QPDFExc.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/QPDFObjGen.hh b/include/qpdf/QPDFObjGen.hh index 67ef1b0..fde5678 100644 --- a/include/qpdf/QPDFObjGen.hh +++ b/include/qpdf/QPDFObjGen.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/QPDFObject.hh b/include/qpdf/QPDFObject.hh index d58deb7..6230eff 100644 --- a/include/qpdf/QPDFObject.hh +++ b/include/qpdf/QPDFObject.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 8140005..007eaff 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/QPDFTokenizer.hh b/include/qpdf/QPDFTokenizer.hh index 081e12d..82fee71 100644 --- a/include/qpdf/QPDFTokenizer.hh +++ b/include/qpdf/QPDFTokenizer.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/QPDFWriter.hh b/include/qpdf/QPDFWriter.hh index 9210414..e197344 100644 --- a/include/qpdf/QPDFWriter.hh +++ b/include/qpdf/QPDFWriter.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/QPDFXRefEntry.hh b/include/qpdf/QPDFXRefEntry.hh index 93dac02..ed29a9e 100644 --- a/include/qpdf/QPDFXRefEntry.hh +++ b/include/qpdf/QPDFXRefEntry.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/QTC.hh b/include/qpdf/QTC.hh index c8ee6ad..1875c44 100644 --- a/include/qpdf/QTC.hh +++ b/include/qpdf/QTC.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh index 7b910b7..5c2e548 100644 --- a/include/qpdf/QUtil.hh +++ b/include/qpdf/QUtil.hh @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2013 Jay Berkenbilt +// Copyright (c) 2005-2014 Jay Berkenbilt // // This file is part of qpdf. This software may be distributed under // the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/RandomDataProvider.hh b/include/qpdf/RandomDataProvider.hh index 68c9cb6..79c8508 100644 --- a/include/qpdf/RandomDataProvider.hh +++ b/include/qpdf/RandomDataProvider.hh @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Jay Berkenbilt +/* Copyright (c) 2005-2014 Jay Berkenbilt * * This file is part of qpdf. This software may be distributed under * the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/Types.h b/include/qpdf/Types.h index 146acc2..c833da6 100644 --- a/include/qpdf/Types.h +++ b/include/qpdf/Types.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Jay Berkenbilt +/* Copyright (c) 2005-2014 Jay Berkenbilt * * This file is part of qpdf. This software may be distributed under * the terms of version 2 of the Artistic License which may be found diff --git a/include/qpdf/qpdf-c.h b/include/qpdf/qpdf-c.h index ee4fa58..809ca97 100644 --- a/include/qpdf/qpdf-c.h +++ b/include/qpdf/qpdf-c.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Jay Berkenbilt +/* Copyright (c) 2005-2014 Jay Berkenbilt * * This file is part of qpdf. This software may be distributed under * the terms of version 2 of the Artistic License which may be found diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index 543b34b..f1107e8 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -20,7 +20,7 @@ #include <qpdf/QPDF_Null.hh> #include <qpdf/QPDF_Dictionary.hh> -std::string QPDF::qpdf_version = "5.1.0"; +std::string QPDF::qpdf_version = "5.1.1"; static char const* EMPTY_PDF = "%PDF-1.3\n" @@ -1755,6 +1755,11 @@ QPDF::reserveObjects(QPDFObjectHandle foreign, ObjCopier& obj_copier, QTC::TC("qpdf", "QPDF loop reserving objects"); return; } + if (obj_copier.object_map.find(foreign_og) != obj_copier.object_map.end()) + { + QTC::TC("qpdf", "QPDF already reserved object"); + return; + } QTC::TC("qpdf", "QPDF copy indirect"); obj_copier.visiting.insert(foreign_og); std::map<QPDFObjGen, QPDFObjectHandle>::iterator mapping = diff --git a/libqpdf/build.mk b/libqpdf/build.mk index cc815b1..0cbc875 100644 --- a/libqpdf/build.mk +++ b/libqpdf/build.mk @@ -96,4 +96,4 @@ $(COBJS_libqpdf): libqpdf/$(OUTPUT_DIR)/%.$(LOBJ): libqpdf/%.c # * Otherwise, increment REVISION $(TARGETS_libqpdf): $(OBJS_libqpdf) - $(call makelib,$(OBJS_libqpdf),$@,$(LDFLAGS),$(LIBS),14,0,1) + $(call makelib,$(OBJS_libqpdf),$@,$(LDFLAGS),$(LIBS),14,1,1) diff --git a/manual/qpdf-manual.xml b/manual/qpdf-manual.xml index 72a52a7..5f39892 100644 --- a/manual/qpdf-manual.xml +++ b/manual/qpdf-manual.xml @@ -5,8 +5,8 @@ <!ENTITY mdash "—"> <!ENTITY ndash "–"> <!ENTITY nbsp " "> -<!ENTITY swversion "5.1.0"> -<!ENTITY lastreleased "December 17, 2013"> +<!ENTITY swversion "5.1.1"> +<!ENTITY lastreleased "December 17, 2014"> ]> <book> <bookinfo> @@ -16,7 +16,7 @@ <firstname>Jay</firstname><surname>Berkenbilt</surname> </author> <copyright> - <year>2005–2013</year> + <year>2005–2014</year> <holder>Jay Berkenbilt</holder> </copyright> </bookinfo> @@ -2666,6 +2666,21 @@ print "\n"; </para> <variablelist> <varlistentry> + <term>5.1.1: January 14, 2014</term> + <listitem> + <itemizedlist> + <listitem> + <para> + Performance fix: copying foreign objects could be very slow + with certain types of files. This was most likely to be + visible during page splitting and was due to traversing the + same objects multiple times in some cases. + </para> + </listitem> + </itemizedlist> + </listitem> + </varlistentry> + <varlistentry> <term>5.1.0: December 17, 2013</term> <listitem> <itemizedlist> @@ -3144,8 +3159,6 @@ print "\n"; </itemizedlist> </listitem> </varlistentry> - </variablelist> - <variablelist> <varlistentry> <term>3.0.2: September 6, 2012</term> <listitem> @@ -3170,8 +3183,6 @@ print "\n"; </itemizedlist> </listitem> </varlistentry> - </variablelist> - <variablelist> <varlistentry> <term>3.0.1: August 11, 2012</term> <listitem> @@ -3195,8 +3206,6 @@ print "\n"; </itemizedlist> </listitem> </varlistentry> - </variablelist> - <variablelist> <varlistentry> <term>3.0.0: August 2, 2012</term> <listitem> @@ -3351,8 +3360,6 @@ print "\n"; </itemizedlist> </listitem> </varlistentry> - </variablelist> - <variablelist> <varlistentry> <term>2.3.1: December 28, 2011</term> <listitem> @@ -3450,8 +3457,6 @@ print "\n"; </itemizedlist> </listitem> </varlistentry> - </variablelist> - <variablelist> <varlistentry> <term>2.2.4: June 25, 2011</term> <listitem> diff --git a/qpdf/qpdf.cc b/qpdf/qpdf.cc index be8198e..a534d30 100644 --- a/qpdf/qpdf.cc +++ b/qpdf/qpdf.cc @@ -974,7 +974,7 @@ int main(int argc, char* argv[]) // 12345678901234567890123456789012345678901234567890123456789012345678901234567890 std::cout << whoami << " version " << QPDF::QPDFVersion() << std::endl - << "Copyright (c) 2005-2013 Jay Berkenbilt" + << "Copyright (c) 2005-2014 Jay Berkenbilt" << std::endl << "This software may be distributed under the terms of version 2 of the" << std::endl diff --git a/qpdf/qpdf.testcov b/qpdf/qpdf.testcov index e78a4f4..b1dc2c0 100644 --- a/qpdf/qpdf.testcov +++ b/qpdf/qpdf.testcov @@ -268,3 +268,4 @@ QPDF xref space 2 qpdf pages range omitted at end 0 qpdf pages range omitted in middle 0 qpdf npages 0 +QPDF already reserved object 0 |