Commit ace2a031b5c1580ea9a69f116e6a8c9393860267

Authored by Jay Berkenbilt
1 parent b0a6f495

prepare 2.1.rc1 for release

git-svn-id: svn+q:///qpdf/trunk@901 71b93d88-0707-0410-a8cf-f5a4172ac649
ChangeLog
  1 +2009-10-25 Jay Berkenbilt <ejb@ql.org>
  2 +
  3 + * 2.1.rc1: release
  4 +
1 2009-10-19 Jay Berkenbilt <jberkenb@argonst.com> 5 2009-10-19 Jay Berkenbilt <jberkenb@argonst.com>
2 6
3 * include/qpdf/QPDF.hh (QPDF): getWarnings now returns a list of 7 * include/qpdf/QPDF.hh (QPDF): getWarnings now returns a list of
@@ -21,6 +25,12 @@ @@ -21,6 +25,12 @@
21 * libqpdf/QPDFWriter.cc (unparseObject): avoid compressing 25 * libqpdf/QPDFWriter.cc (unparseObject): avoid compressing
22 Metadata streams if possible. 26 Metadata streams if possible.
23 27
  28 +2009-10-13 Jay Berkenbilt <ejb@ql.org>
  29 +
  30 + * Upgrade embedded qtest to version 1.4, which allows the test
  31 + suite to be run in Windows with MSYS and ActiveState Perl rather
  32 + than requiring Cygwin perl.
  33 +
24 2009-10-04 Jay Berkenbilt <ejb@ql.org> 34 2009-10-04 Jay Berkenbilt <ejb@ql.org>
25 35
26 * Implement support AES encrypt and crypt filters. Implementation 36 * Implement support AES encrypt and crypt filters. Implementation
@@ -60,7 +70,7 @@ @@ -60,7 +70,7 @@
60 70
61 2009-05-03 Jay Berkenbilt <ejb@ql.org> 71 2009-05-03 Jay Berkenbilt <ejb@ql.org>
62 72
63 - * 2.0.6. release 73 + * 2.0.6: release
64 74
65 * libqpdf/QPDF_Stream.cc (filterable): ignore /DecodeParms if it's 75 * libqpdf/QPDF_Stream.cc (filterable): ignore /DecodeParms if it's
66 not a type we recognize. (Fixes qpdf-Bugs-2779746.) 76 not a type we recognize. (Fixes qpdf-Bugs-2779746.)
@@ -9,6 +9,18 @@ Artistic License which may be found in the source distribution as @@ -9,6 +9,18 @@ Artistic License which may be found in the source distribution as
9 warranty. 9 warranty.
10 10
11 11
  12 +Prerequisites
  13 +=============
  14 +
  15 +QPDF depends on external libraries "zlib" and "pcre". These are part
  16 +of virtually all Linux distributions and are readily available;
  17 +download information appears in the documentation. You can also
  18 +download the external library distributions in source from from qpdf's
  19 +download site. For Windows, you can download pre-built binary
  20 +verisons of those libraries for some compilers; see README.windows for
  21 +additional details.
  22 +
  23 +
12 Licensing terms of embedded software 24 Licensing terms of embedded software
13 ==================================== 25 ====================================
14 26
@@ -71,9 +83,11 @@ user&#39;s manual can be found in the &quot;doc&quot; directory. The docbook @@ -71,9 +83,11 @@ user&#39;s manual can be found in the &quot;doc&quot; directory. The docbook
71 sources to the user's manual can be found in the "manual" directory. 83 sources to the user's manual can be found in the "manual" directory.
72 84
73 The software library is just libqpdf, and all the header files are in 85 The software library is just libqpdf, and all the header files are in
74 -the qpdf subdirectory. If you link with -lqpdf and your system does  
75 -not know how to read libtool .la files, then you will also need to  
76 -link with -lpcre and -lz. 86 +the qpdf subdirectory. If you link statically with -lqpdf, then you
  87 +will also need to link with -lpcre and -lz. The shared qpdf library
  88 +is linked with -lpcre and -lz, and none of qpdf's public header files
  89 +directly include files from pcre or libz, so in many cases, qpdf's
  90 +development files are self contained.
77 91
78 To learn about using the library, please read comments in the header 92 To learn about using the library, please read comments in the header
79 files in include/qpdf, especially QPDF.hh, QPDFObjectHandle.hh, and 93 files in include/qpdf, especially QPDF.hh, QPDFObjectHandle.hh, and
README-what-to-download.txt 0 → 100644
  1 +To build from source for Linux or other UNIX/UNIX-like systems, it is
  2 +generally sufficient to download just the source qpdf-<version>.tar.gz
  3 +file.
  4 +
  5 +For Windows, there are several additional files that you might want to
  6 +download.
  7 +
  8 + * qpdf-<version>-bin-mingw.zip
  9 +
  10 + If you just want to use the qpdf commandline program or use the
  11 + qpdf DLL's C-language interface, you can download this file. You
  12 + can also download this version if you are using MINGW's gcc 4.4 and
  13 + want to program using the C++ interface.
  14 +
  15 + * qpdf-<version>-bin-msvc.zip
  16 +
  17 + If you want to program using qpdf's C++ interface and you are using
  18 + Microsoft Visual C++ .NET 2008 (VC9), you can download this file.
  19 +
  20 + * qpdf-external-libs-bin.zip
  21 +
  22 + If you want to build qpdf for Windows yourself with either MINGW's
  23 + gcc 4.4 or VC9, you can download this file and extract it inside
  24 + the qpdf source distribution. Please refer to README.windows in
  25 + the qpdf source distribution for additional details.
  26 +
  27 + * qpdf-external-libs-src.zip
  28 +
  29 + If you want to build the external libraries on your own (for
  30 + Windows or anything else), you can download this archive. In
  31 + addition to including unmodified distributions of pcre and zlib, it
  32 + includes a README file and some scripts to help you build them for
  33 + Windows.
README.maintainer
@@ -11,7 +11,7 @@ Release Reminders @@ -11,7 +11,7 @@ Release Reminders
11 11
12 configure.ac 12 configure.ac
13 qpdf.spec 13 qpdf.spec
14 - qpdf/qpdf.cc 14 + libqpdf/QPDF.cc
15 manual/qpdf-manual.xml 15 manual/qpdf-manual.xml
16 16
17 make_dist verifies this consistency. 17 make_dist verifies this consistency.
@@ -55,7 +55,8 @@ Release Reminders @@ -55,7 +55,8 @@ Release Reminders
55 * Remember to update documentation in the "files" subdirectory of the 55 * Remember to update documentation in the "files" subdirectory of the
56 website on sourceforge.net. 56 website on sourceforge.net.
57 57
58 - * Create a tag in the version control system. 58 + * Create a tag in the version control system, and make backups of the
  59 + actual releases.
59 60
60 * When releasing on source forge, external-libs distributions go in 61 * When releasing on source forge, external-libs distributions go in
61 external-libs/yyyymmdd, and qpdf distributions go in qpdf/vvv 62 external-libs/yyyymmdd, and qpdf distributions go in qpdf/vvv
1 2.1 1 2.1
2 === 2 ===
3 3
4 - * Update documentation to reflect new command line flags and any  
5 - other relevant changes. Should read through ChangeLog and the  
6 - manual before releasing 2.1.  
7 -  
8 - * Write documentation section on source-level API changes between 2.0  
9 - and 2.1.  
10 -  
11 - * Add comments for the security functions that map them back to the  
12 - items in Adobe's products.  
13 -  
14 - * Create the following packages:  
15 -  
16 - - README-what-to-download.txt -- descriptions of what to download  
17 - on Windows, etc.  
18 -  
19 - * make_windows_releases:  
20 -  
21 - - make sure external-libs exists; if not, tell the user to extract  
22 - it  
23 -  
24 - - set path to include libqpdf/build  
25 -  
26 - - ./config-mingw; make check install  
27 -  
28 - - make distclean  
29 -  
30 - - ./config-msvc; make check install  
31 -  
32 - - instruct the user to create qpdf-vvv-bin-mingw.zip and  
33 - qpdf-vvv-bin-msvc.zip from the contents of the install-mingw and  
34 - install-msys directories.  
35 -  
36 - *** still have to make sure libqpdf.a/qpdf.lib doesn't have to be  
37 - in the same directory as the dll, but I'm pretty sure it  
38 - doesn't.  
39 -  
40 - * "Delphi wrapper unit 'qpdf.pas' created by Zarko Gajic  
41 - (http://delphi.about.com). .. use at your own risk and for whatever  
42 - the purpose you want .. no support provided. Sample code provided."  
43 - 4 + * Remove rc1 from version; search for rc1 in release notes as
  5 + well...just change rc1 to 2.1 and update the date.
44 6
45 2.2 7 2.2
46 === 8 ===
include/qpdf/Constants.h
@@ -48,13 +48,13 @@ enum qpdf_r3_print_e @@ -48,13 +48,13 @@ enum qpdf_r3_print_e
48 qpdf_r3p_low, /* allow only low-resolution printing */ 48 qpdf_r3p_low, /* allow only low-resolution printing */
49 qpdf_r3p_none /* allow no printing */ 49 qpdf_r3p_none /* allow no printing */
50 }; 50 };
51 -enum qpdf_r3_modify_e 51 +enum qpdf_r3_modify_e /* Allowed changes: */
52 { 52 {
53 - qpdf_r3m_all = 0, /* allow all modification */  
54 - qpdf_r3m_annotate, /* allow comment authoring and form operations */  
55 - qpdf_r3m_form, /* allow form field fill-in or signing */  
56 - qpdf_r3m_assembly, /* allow only document assembly */  
57 - qpdf_r3m_none /* allow no modification */ 53 + qpdf_r3m_all = 0, /* General editing, comments, forms */
  54 + qpdf_r3m_annotate, /* Comments, form field fill-in, and signing */
  55 + qpdf_r3m_form, /* form field fill-in and signing */
  56 + qpdf_r3m_assembly, /* only document assembly */
  57 + qpdf_r3m_none /* no modifications */
58 }; 58 };
59 59
60 #endif /* __QPDFCONSTANTS_H__ */ 60 #endif /* __QPDFCONSTANTS_H__ */
include/qpdf/QPDF.hh
@@ -28,6 +28,10 @@ class QPDFExc; @@ -28,6 +28,10 @@ class QPDFExc;
28 class QPDF 28 class QPDF
29 { 29 {
30 public: 30 public:
  31 + // Get the current version of the QPDF software
  32 + QPDF_DLL
  33 + static std::string const& QPDFVersion();
  34 +
31 QPDF_DLL 35 QPDF_DLL
32 QPDF(); 36 QPDF();
33 QPDF_DLL 37 QPDF_DLL
@@ -304,6 +308,8 @@ class QPDF @@ -304,6 +308,8 @@ class QPDF
304 friend class Pipe; 308 friend class Pipe;
305 309
306 private: 310 private:
  311 + static std::string qpdf_version;
  312 +
307 class InputSource 313 class InputSource
308 { 314 {
309 public: 315 public:
libqpdf/QPDF.cc
@@ -15,6 +15,8 @@ @@ -15,6 +15,8 @@
15 #include <qpdf/QPDF_Null.hh> 15 #include <qpdf/QPDF_Null.hh>
16 #include <qpdf/QPDF_Dictionary.hh> 16 #include <qpdf/QPDF_Dictionary.hh>
17 17
  18 +std::string QPDF::qpdf_version = "2.1.rc1";
  19 +
18 void 20 void
19 QPDF::InputSource::setLastOffset(off_t offset) 21 QPDF::InputSource::setLastOffset(off_t offset)
20 { 22 {
@@ -249,6 +251,12 @@ QPDF::ObjGen::operator&lt;(ObjGen const&amp; rhs) const @@ -249,6 +251,12 @@ QPDF::ObjGen::operator&lt;(ObjGen const&amp; rhs) const
249 ((this->obj == rhs.obj) && (this->gen < rhs.gen))); 251 ((this->obj == rhs.obj) && (this->gen < rhs.gen)));
250 } 252 }
251 253
  254 +std::string const&
  255 +QPDF::QPDFVersion()
  256 +{
  257 + return QPDF::qpdf_version;
  258 +}
  259 +
252 QPDF::QPDF() : 260 QPDF::QPDF() :
253 encrypted(false), 261 encrypted(false),
254 encryption_initialized(false), 262 encryption_initialized(false),
make_dist
@@ -48,11 +48,11 @@ while (&lt;$fh&gt;) @@ -48,11 +48,11 @@ while (&lt;$fh&gt;)
48 } 48 }
49 $fh->close(); 49 $fh->close();
50 50
51 -$fh = safe_open("qpdf/qpdf.cc"); 51 +$fh = safe_open("libqpdf/QPDF.cc");
52 my $code_version = 'unknown'; 52 my $code_version = 'unknown';
53 while (<$fh>) 53 while (<$fh>)
54 { 54 {
55 - if (m/whoami << \" version ([^\"]+)\"/) 55 + if (m/QPDF::qpdf_version = ([^\"]+)\"/)
56 { 56 {
57 $code_version = $1; 57 $code_version = $1;
58 last; 58 last;
make_windows_releases
@@ -18,8 +18,8 @@ make distclean @@ -18,8 +18,8 @@ make distclean
18 make check install 18 make check install
19 make distclean 19 make distclean
20 20
21 -cp -p README-windows-install.txt install-mingw/README.txt  
22 -cp -p README-windows-install.txt install-msvc/README.txt 21 +cp -p README-windows-install.txt install-mingw/qpdf*/README.txt
  22 +cp -p README-windows-install.txt install-msvc/qpdf*/README.txt
23 23
24 set +x 24 set +x
25 25
manual/qpdf-manual.xml
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 <!ENTITY mdash "&#x2014;"> 5 <!ENTITY mdash "&#x2014;">
6 <!ENTITY ndash "&#x2013;"> 6 <!ENTITY ndash "&#x2013;">
7 <!ENTITY nbsp "&#xA0;"> 7 <!ENTITY nbsp "&#xA0;">
8 -<!ENTITY swversion "2.1.a1">  
9 -<!ENTITY lastreleased "XXX, 2009"> 8 +<!ENTITY swversion "2.1.rc1">
  9 +<!ENTITY lastreleased "October 25, 2009">
10 ]> 10 ]>
11 <book> 11 <book>
12 <bookinfo> 12 <bookinfo>
@@ -218,7 +218,9 @@ make @@ -218,7 +218,9 @@ make
218 <option>outfilename</option> does not have to be seekable, even 218 <option>outfilename</option> does not have to be seekable, even
219 when generating linearized files. Specifying 219 when generating linearized files. Specifying
220 &ldquo;<option>-</option>&rdquo; as <option>outfilename</option> 220 &ldquo;<option>-</option>&rdquo; as <option>outfilename</option>
221 - means to write to standard output. 221 + means to write to standard output. However, you can't specify the
  222 + same file as both the input and the output because qpdf reads data
  223 + from the input file as it writes to the output file.
222 </para> 224 </para>
223 <para> 225 <para>
224 Most options require an output file, but some testing or 226 Most options require an output file, but some testing or
@@ -399,7 +401,8 @@ make @@ -399,7 +401,8 @@ make
399 <para> 401 <para>
400 Controls modify access. 402 Controls modify access.
401 <option><replaceable>modify-opt</replaceable></option> may be 403 <option><replaceable>modify-opt</replaceable></option> may be
402 - one of the following: 404 + one of the following, each of which implies all the options
  405 + that follow it:
403 <itemizedlist> 406 <itemizedlist>
404 <listitem> 407 <listitem>
405 <para> 408 <para>
@@ -430,6 +433,40 @@ make @@ -430,6 +433,40 @@ make
430 </para> 433 </para>
431 </listitem> 434 </listitem>
432 </varlistentry> 435 </varlistentry>
  436 + <varlistentry>
  437 + <term><option>--cleartext-metadata</option></term>
  438 + <listitem>
  439 + <para>
  440 + If specified, any metadata stream in the document will be left
  441 + unencrypted even if the rest of the document is encrypted.
  442 + This also forces the PDF version to be at least 1.5.
  443 + </para>
  444 + </listitem>
  445 + </varlistentry>
  446 + <varlistentry>
  447 + <term><option>--use-aes=[yn]</option></term>
  448 + <listitem>
  449 + <para>
  450 + If <option>--use-aes=y</option> is specified, AES encryption
  451 + will be used instead of RC4 encryption. This forces the PDF
  452 + version to be at least 1.6.
  453 + </para>
  454 + </listitem>
  455 + </varlistentry>
  456 + <varlistentry>
  457 + <term><option>--force-V4</option></term>
  458 + <listitem>
  459 + <para>
  460 + Use of this option forces the <literal>/V</literal> and
  461 + <literal>/R</literal> parameters in the document's encryption
  462 + dictionary to be set to the value <literal>4</literal>. As
  463 + qpdf will automatically do this when required, there is no
  464 + reason to ever use this option. It exists primarily for use
  465 + in testing qpdf itself. This option also forces the PDF
  466 + version to be at least 1.5.
  467 + </para>
  468 + </listitem>
  469 + </varlistentry>
433 </variablelist> 470 </variablelist>
434 The default for each permission option is to be fully permissive. 471 The default for each permission option is to be fully permissive.
435 </para> 472 </para>
@@ -533,6 +570,50 @@ make @@ -533,6 +570,50 @@ make
533 </para> 570 </para>
534 </listitem> 571 </listitem>
535 </varlistentry> 572 </varlistentry>
  573 + <varlistentry>
  574 + <term><option>--min-version=<replaceable>version</replaceable></option></term>
  575 + <listitem>
  576 + <para>
  577 + Forces the PDF version of the output file to be at least
  578 + <replaceable>version</replaceable>. In other words, if the
  579 + input file has a lower version than the specified version, the
  580 + specified version will be used. If the input file has a
  581 + higher version, the input file's original version will be
  582 + used. It is seldom necessary to use this option since qpdf
  583 + will automatically increase the version as needed when adding
  584 + features that require newer PDF readers.
  585 + </para>
  586 + </listitem>
  587 + </varlistentry>
  588 + <varlistentry>
  589 + <term><option>--force-version=<replaceable>version</replaceable></option></term>
  590 + <listitem>
  591 + <para>
  592 + This option forces the PDF version to be the exact version
  593 + specified <emphasis>even when the file may have content that
  594 + is not supported in that version</emphasis>. In some cases,
  595 + forcing the output file's PDF version to be lower than that of
  596 + the input file will cause qpdf to disable certain features of
  597 + the document. Specifically, AES encryption is disabled if the
  598 + version is less than 1.6, cleartext metadata and object
  599 + streams are disabled if less than 1.5, 128-bit encryption keys
  600 + are disabled if less than 1.4, and all encryption is disabled
  601 + if less than 1.3. Even with these precautions, qpdf won't be
  602 + able to do things like eliminate use of newer image
  603 + compression schemes, transparency groups, or other features
  604 + that may have been added in more recent versions of PDF.
  605 + </para>
  606 + <para>
  607 + As a general rule, with the exception of big structural things
  608 + like the use of object streams or AES encryption, PDF viewers
  609 + are supposed to ignore features in files that they don't
  610 + support from newer versions. This means that forcing the
  611 + version to a lower version may make it possible to open your
  612 + PDF file with an older version, though bear in mind that some
  613 + of the original document's functionality may be lost.
  614 + </para>
  615 + </listitem>
  616 + </varlistentry>
536 </variablelist> 617 </variablelist>
537 </para> 618 </para>
538 <para> 619 <para>
@@ -1985,8 +2066,170 @@ print &quot;\n&quot;; @@ -1985,8 +2066,170 @@ print &quot;\n&quot;;
1985 </chapter> 2066 </chapter>
1986 <appendix id="ref.release-notes"> 2067 <appendix id="ref.release-notes">
1987 <title>Release Notes</title> 2068 <title>Release Notes</title>
  2069 + <para>
  2070 + For a detailed list of changes, please see the file
  2071 + <filename>ChangeLog</filename> in the source distribution.
  2072 + </para>
1988 <variablelist> 2073 <variablelist>
1989 <varlistentry> 2074 <varlistentry>
  2075 + <term>2.1.rc1: October 25, 2009</term>
  2076 + <listitem>
  2077 + <itemizedlist>
  2078 + <listitem>
  2079 + <para>
  2080 + This is the first version of qpdf to include Windows support.
  2081 + On Windows, it is possible to build a DLL. Additionally, a
  2082 + partial C-language API has been introduced, which makes it
  2083 + possible to call qpdf functions from non-C++ environments. I
  2084 + am very grateful to Zarko Gagic (<ulink
  2085 + url="http://delphi.about.com/">http://delphi.about.com/</ulink>)
  2086 + for tirelessly testing numerous pre-release versions of this
  2087 + DLL and providing many excellent suggestions on improving the
  2088 + interface.
  2089 + </para>
  2090 + <para>
  2091 + For programming to the C interface, please see the header file
  2092 + <filename>qpdf/qpdf-c.h</filename> and the example
  2093 + <filename>examples/pdf-linearize.c</filename>.
  2094 + </para>
  2095 + </listitem>
  2096 + <listitem>
  2097 + <para>
  2098 + Zarko Gajic has written a Delphi wrapper for qpdf, which can
  2099 + be downloaded from qpdf's download side. Zarko's Delphi
  2100 + wrapper is released with the same licensing terms as qpdf
  2101 + itself and comes with this disclaimer: &ldquo;Delphi wrapper
  2102 + unit <filename>qpdf.pas</filename> created by Zarko Gajic
  2103 + (<ulink
  2104 + url="http://delphi.about.com/">http://delphi.about.com/</ulink>).
  2105 + Use at your own risk and for whatever purpose you want. No
  2106 + support is provided. Sample code is provided.&rdquo;
  2107 + </para>
  2108 + </listitem>
  2109 + <listitem>
  2110 + <para>
  2111 + Support has been added for AES encryption and crypt filters.
  2112 + Although qpdf does not presently support files that use
  2113 + PKI-based encryption, with the addition of AES and crypt
  2114 + filters, qpdf is now be able to open most encrypted files
  2115 + created with newer versions of Acrobat or other PDF creation
  2116 + software. Note that I have not been able to get very many
  2117 + files encrypted in this way, so it's possible there could
  2118 + still be some cases that qpdf can't handle. Please report
  2119 + them if you find them.
  2120 + </para>
  2121 + </listitem>
  2122 + <listitem>
  2123 + <para>
  2124 + Many error messages have been improved to include more
  2125 + information in hopes of making qpdf a more useful tool for PDF
  2126 + experts to use in manually recovering damaged PDF files.
  2127 + </para>
  2128 + </listitem>
  2129 + <listitem>
  2130 + <para>
  2131 + Attempt to avoid compressing metadata streams if possible.
  2132 + This is consistent with other PDF creation applications.
  2133 + </para>
  2134 + </listitem>
  2135 + <listitem>
  2136 + <para>
  2137 + Provide new command-line options for AES encrypt, cleartext
  2138 + metadata, and setting the minimum and forced PDF versions of
  2139 + output files.
  2140 + </para>
  2141 + </listitem>
  2142 + <listitem>
  2143 + <para>
  2144 + Add additional methods to the <classname>QPDF</classname>
  2145 + object for querying the document's permissions. Although qpdf
  2146 + does not enforce these permissions, it does make them
  2147 + available so that applications that use qpdf can enforce
  2148 + permissions.
  2149 + </para>
  2150 + </listitem>
  2151 + <listitem>
  2152 + <para>
  2153 + The <option>--check</option> option to <command>qpdf</command>
  2154 + has been extended to include some additional information.
  2155 + </para>
  2156 + </listitem>
  2157 + <listitem>
  2158 + <para>
  2159 + There have been a handful of non-compatible API changes. For
  2160 + details, see <xref linkend="ref.upgrading-to-2.1"/>.
  2161 + </para>
  2162 + </listitem>
  2163 + </itemizedlist>
  2164 + </listitem>
  2165 + </varlistentry>
  2166 + <varlistentry>
  2167 + <term>2.0.6: May 3, 2009</term>
  2168 + <listitem>
  2169 + <itemizedlist>
  2170 + <listitem>
  2171 + <para>
  2172 + Do not attempt to uncompress streams that have decode
  2173 + parameters we don't recognize. Earlier versions of qpdf would
  2174 + have rejected files with such streams.
  2175 + </para>
  2176 + </listitem>
  2177 + </itemizedlist>
  2178 + </listitem>
  2179 + </varlistentry>
  2180 + <varlistentry>
  2181 + <term>2.0.5: March 10, 2009</term>
  2182 + <listitem>
  2183 + <itemizedlist>
  2184 + <listitem>
  2185 + <para>
  2186 + Improve error handling in the LZW decoder, and fix a small
  2187 + error introduced in the previous version with regard to
  2188 + handling full tables. The LZW decoder has been more strongly
  2189 + verified in this release.
  2190 + </para>
  2191 + </listitem>
  2192 + </itemizedlist>
  2193 + </listitem>
  2194 + </varlistentry>
  2195 + <varlistentry>
  2196 + <term>2.0.4: February 21, 2009</term>
  2197 + <listitem>
  2198 + <itemizedlist>
  2199 + <listitem>
  2200 + <para>
  2201 + Include proper support for LZW streams encoded without the
  2202 + &ldquo;early code change&rdquo; flag. Special thanks to Atom
  2203 + Smasher who reported the problem and provided an input file
  2204 + compressed in this way, which I did not previously have.
  2205 + </para>
  2206 + </listitem>
  2207 + <listitem>
  2208 + <para>
  2209 + Implement some improvements to file recovery logic.
  2210 + </para>
  2211 + </listitem>
  2212 + </itemizedlist>
  2213 + </listitem>
  2214 + </varlistentry>
  2215 + <varlistentry>
  2216 + <term>2.0.3: February 15, 2009</term>
  2217 + <listitem>
  2218 + <itemizedlist>
  2219 + <listitem>
  2220 + <para>
  2221 + Compile cleanly with gcc 4.4.
  2222 + </para>
  2223 + </listitem>
  2224 + <listitem>
  2225 + <para>
  2226 + Handle strings encoded as UTF-16BE properly.
  2227 + </para>
  2228 + </listitem>
  2229 + </itemizedlist>
  2230 + </listitem>
  2231 + </varlistentry>
  2232 + <varlistentry>
1990 <term>2.0.2: June 30, 2008</term> 2233 <term>2.0.2: June 30, 2008</term>
1991 <listitem> 2234 <listitem>
1992 <itemizedlist> 2235 <itemizedlist>
@@ -2031,4 +2274,87 @@ print &quot;\n&quot;; @@ -2031,4 +2274,87 @@ print &quot;\n&quot;;
2031 </varlistentry> 2274 </varlistentry>
2032 </variablelist> 2275 </variablelist>
2033 </appendix> 2276 </appendix>
  2277 + <appendix id="ref.upgrading-to-2.1">
  2278 + <title>Upgrading from 2.0 to 2.1</title>
  2279 + <para>
  2280 + Although, as a general rule, we like to avoid introducing
  2281 + source-level incompatibilities in qpdf's interface, there were a
  2282 + few non-compatible changes made in this version. A considerable
  2283 + amount of source code that uses qpdf will probably compile without
  2284 + any changes, but in some cases, you may have to update your code.
  2285 + The changes are enumerated here. There are also some new
  2286 + interfaces; for those, please refer to the header files.
  2287 + </para>
  2288 + <itemizedlist>
  2289 + <listitem>
  2290 + <para>
  2291 + QPDF's exception handling mechanism now uses
  2292 + <classname>std::logic_error</classname> for internal errors and
  2293 + <classname>std::runtime_error</classname> for runtime errors in
  2294 + favor of the now removed <classname>QEXC</classname> classes used
  2295 + in previous versions. The <classname>QEXC</classname> exception
  2296 + classes predated the addition of the
  2297 + <filename>&lt;stdexcept&gt;</filename> header file to the C++
  2298 + standard library. Most of the exceptions thrown by the qpdf
  2299 + library itself are still of type <classname>QPDFExc</classname>
  2300 + which is now derived from
  2301 + <classname>std::runtime_error</classname>. Programs that caught
  2302 + an instance of <classname>std::exception</classname> and
  2303 + displayed it by calling the <function>what()</function> method
  2304 + will not need to be changed.
  2305 + </para>
  2306 + </listitem>
  2307 + <listitem>
  2308 + <para>
  2309 + The <classname>QPDFExc</classname> class now internally
  2310 + represents various fields of the error condition and provides
  2311 + interfaces for querying them. Among the fields is a numeric
  2312 + error code that can help applications act differently on (a small
  2313 + number of) different error conditions. See
  2314 + <filename>QPDFExc.hh</filename> for details.
  2315 + </para>
  2316 + </listitem>
  2317 + <listitem>
  2318 + <para>
  2319 + Warnings can be retrieved from qpdf as instances of
  2320 + <classname>QPDFExc</classname> instead of strings.
  2321 + </para>
  2322 + </listitem>
  2323 + <listitem>
  2324 + <para>
  2325 + The nested <classname>QPDF::EncryptionData</classname> class's
  2326 + constructor takes an additional argument. This class is
  2327 + primarily intended to be used by
  2328 + <classname>QPDFWriter</classname>. There's not really anything
  2329 + useful an end-user application could do with it. It probably
  2330 + shouldn't really be part of the public interface to begin with.
  2331 + Likewise, some of the methods for computing internal encryption
  2332 + dictionary parameters have changed to support
  2333 + <literal>/R=4</literal> encryption.
  2334 + </para>
  2335 + </listitem>
  2336 + <listitem>
  2337 + <para>
  2338 + The method <function>QPDF::getUserPassword</function> has been
  2339 + removed since it didn't do what people would think it did. There
  2340 + are now two new methods:
  2341 + <function>QPDF::getPaddedUserPassword</function> and
  2342 + <function>QPDF::getTrimmedUserPassword</function>. The first one
  2343 + does what the old <function>QPDF::getUserPassword</function>
  2344 + method used to do, which is to return the password with possible
  2345 + binary padding as specified by the PDF specification. The second
  2346 + one returns a human-readable password string.
  2347 + </para>
  2348 + </listitem>
  2349 + <listitem>
  2350 + <para>
  2351 + The enumerated types that used to be nested in
  2352 + <classname>QPDFWriter</classname> have moved to top-level
  2353 + enumerated types and are now defined in the file
  2354 + <filename>qpdf/Constants.h</filename>. This enables them to be
  2355 + shared by both the C and C++ interfaces.
  2356 + </para>
  2357 + </listitem>
  2358 + </itemizedlist>
  2359 + </appendix>
2034 </book> 2360 </book>
qpdf.spec
1 Summary: Command-line tools and library for transforming PDF files 1 Summary: Command-line tools and library for transforming PDF files
2 Name: qpdf 2 Name: qpdf
3 -Version: 2.1.a1 3 +Version: 2.1.rc1
4 Release: 1%{?dist} 4 Release: 1%{?dist}
5 License: Artistic 5 License: Artistic
6 Group: System Environment/Libraries 6 Group: System Environment/Libraries
7 -URL: http://sourceforge.net/projects/qpdf/ 7 +URL: http://qpdf.sourceforge.net/
8 8
9 Source: %{name}-%{version}.tar.gz 9 Source: %{name}-%{version}.tar.gz
10 10
qpdf/qpdf.cc
@@ -555,7 +555,7 @@ int main(int argc, char* argv[]) @@ -555,7 +555,7 @@ int main(int argc, char* argv[])
555 // 1 2 3 4 5 6 7 8 555 // 1 2 3 4 5 6 7 8
556 // 12345678901234567890123456789012345678901234567890123456789012345678901234567890 556 // 12345678901234567890123456789012345678901234567890123456789012345678901234567890
557 std::cout 557 std::cout
558 - << whoami << " version 2.1.a1" << std::endl 558 + << whoami << " version " << QPDF::QPDFVersion() << std::endl
559 << "Copyright (c) 2005-2009 Jay Berkenbilt" 559 << "Copyright (c) 2005-2009 Jay Berkenbilt"
560 << std::endl 560 << std::endl
561 << "This software may be distributed under the terms of version 2 of the" 561 << "This software may be distributed under the terms of version 2 of the"
qpdf/qtest/qpdf.test
@@ -81,7 +81,12 @@ flush_tiff_cache(); @@ -81,7 +81,12 @@ flush_tiff_cache();
81 show_ntests(); 81 show_ntests();
82 # ---------- 82 # ----------
83 $td->notify("--- Miscellaneous Tests ---"); 83 $td->notify("--- Miscellaneous Tests ---");
84 -$n_tests += 14; 84 +$n_tests += 15;
  85 +
  86 +$td->runtest("qpdf version",
  87 + {$td->COMMAND => "qpdf --version"},
  88 + {$td->REGEXP => "qpdf version \\S+\n.*", $td->EXIT_STATUS => 0},
  89 + $td->NORMALIZE_NEWLINES);
85 90
86 foreach (my $i = 1; $i <= 3; ++$i) 91 foreach (my $i = 1; $i <= 3; ++$i)
87 { 92 {