Commit 2f938d4f13637427abaffafca8591e4c7b7263a6
1 parent
003b4c96
Work old "upgrading" sections into the release notes
These are for ancient versions.
Showing
2 changed files
with
69 additions
and
97 deletions
TODO
| ... | ... | @@ -26,8 +26,6 @@ Before release: |
| 26 | 26 | * Release notes link changed (need #ref.release-notes as well as #release-notes) |
| 27 | 27 | * Get navigation working properly |
| 28 | 28 | * Figure out where to put :ref:`search` so we get doc search |
| 29 | -* Change order of sections. Disinction between | |
| 30 | - <preface>/<chapter>/<appendix> was lost | |
| 31 | 29 | |
| 32 | 30 | Soon: |
| 33 | 31 | ... | ... |
manual/index.rst
| ... | ... | @@ -5833,14 +5833,31 @@ For a detailed list of changes, please see the file |
| 5833 | 5833 | Without his work, this release would certainly not have happened |
| 5834 | 5834 | as soon as it did, if at all. |
| 5835 | 5835 | |
| 5836 | - - *Non-compatible API change:* The version of | |
| 5837 | - ``QPDFObjectHandle::replaceStreamData`` that uses a | |
| 5838 | - ``StreamDataProvider`` no longer requires (or accepts) a | |
| 5839 | - ``length`` parameter. See | |
| 5840 | - :ref:`ref.upgrading-to-3.0` for an explanation. | |
| 5841 | - While care is taken to avoid non-compatible API changes in | |
| 5842 | - general, an exception was made this time because the new interface | |
| 5843 | - offers an opportunity to significantly simplify calling code. | |
| 5836 | + - *Non-compatible API changes:* | |
| 5837 | + | |
| 5838 | + - The method ``QPDFObjectHandle::replaceStreamData`` that uses a | |
| 5839 | + ``StreamDataProvider`` to provide the stream data no longer | |
| 5840 | + takes a ``length`` parameter. The parameter was removed since | |
| 5841 | + this provides the user an opportunity to simplify the calling | |
| 5842 | + code. This method was introduced in version 2.2. At the time, | |
| 5843 | + the ``length`` parameter was required in order to ensure that | |
| 5844 | + calls to the stream data provider returned the same length for a | |
| 5845 | + specific stream every time they were invoked. In particular, the | |
| 5846 | + linearization code depends on this. Instead, qpdf 3.0 and newer | |
| 5847 | + check for that constraint explicitly. The first time the stream | |
| 5848 | + data provider is called for a specific stream, the actual length | |
| 5849 | + is saved, and subsequent calls are required to return the same | |
| 5850 | + number of bytes. This means the calling code no longer has to | |
| 5851 | + compute the length in advance, which can be a significant | |
| 5852 | + simplification. If your code fails to compile because of the | |
| 5853 | + extra argument and you don't want to make other changes to your | |
| 5854 | + code, just omit the argument. | |
| 5855 | + | |
| 5856 | + - Many methods take ``long long`` instead of other integer types. | |
| 5857 | + Most if not all existing code should compile fine with this | |
| 5858 | + change since such parameters had always previously been smaller | |
| 5859 | + types. This change was required to support files larger than two | |
| 5860 | + gigabytes in size. | |
| 5844 | 5861 | |
| 5845 | 5862 | - Support has been added for large files. The test suite verifies |
| 5846 | 5863 | support for files larger than 4 gigabytes, and manual testing has |
| ... | ... | @@ -6122,8 +6139,50 @@ For a detailed list of changes, please see the file |
| 6122 | 6139 | :command:`qpdf` has been extended to include some |
| 6123 | 6140 | additional information. |
| 6124 | 6141 | |
| 6125 | - - There have been a handful of non-compatible API changes. For | |
| 6126 | - details, see :ref:`ref.upgrading-to-2.1`. | |
| 6142 | + - *Non-compatible API changes:* | |
| 6143 | + | |
| 6144 | + - QPDF's exception handling mechanism now uses | |
| 6145 | + ``std::logic_error`` for internal errors and | |
| 6146 | + ``std::runtime_error`` for runtime errors in favor of the now | |
| 6147 | + removed ``QEXC`` classes used in previous versions. The ``QEXC`` | |
| 6148 | + exception classes predated the addition of the | |
| 6149 | + :file:`<stdexcept>` header file to the C++ standard library. | |
| 6150 | + Most of the exceptions thrown by the qpdf library itself are | |
| 6151 | + still of type ``QPDFExc`` which is now derived from | |
| 6152 | + ``std::runtime_error``. Programs that caught an instance of | |
| 6153 | + ``std::exception`` and displayed it by calling the ``what()`` | |
| 6154 | + method will not need to be changed. | |
| 6155 | + | |
| 6156 | + - The ``QPDFExc`` class now internally represents various fields | |
| 6157 | + of the error condition and provides interfaces for querying | |
| 6158 | + them. Among the fields is a numeric error code that can help | |
| 6159 | + applications act differently on (a small number of) different | |
| 6160 | + error conditions. See :file:`QPDFExc.hh` for details. | |
| 6161 | + | |
| 6162 | + - Warnings can be retrieved from qpdf as instances of ``QPDFExc`` | |
| 6163 | + instead of strings. | |
| 6164 | + | |
| 6165 | + - The nested ``QPDF::EncryptionData`` class's constructor takes an | |
| 6166 | + additional argument. This class is primarily intended to be used | |
| 6167 | + by ``QPDFWriter``. There's not really anything useful an | |
| 6168 | + end-user application could do with it. It probably shouldn't | |
| 6169 | + really be part of the public interface to begin with. Likewise, | |
| 6170 | + some of the methods for computing internal encryption dictionary | |
| 6171 | + parameters have changed to support ``/R=4`` encryption. | |
| 6172 | + | |
| 6173 | + - The method ``QPDF::getUserPassword`` has been removed since it | |
| 6174 | + didn't do what people would think it did. There are now two new | |
| 6175 | + methods: ``QPDF::getPaddedUserPassword`` and | |
| 6176 | + ``QPDF::getTrimmedUserPassword``. The first one does what the | |
| 6177 | + old ``QPDF::getUserPassword`` method used to do, which is to | |
| 6178 | + return the password with possible binary padding as specified by | |
| 6179 | + the PDF specification. The second one returns a human-readable | |
| 6180 | + password string. | |
| 6181 | + | |
| 6182 | + - The enumerated types that used to be nested in ``QPDFWriter`` | |
| 6183 | + have moved to top-level enumerated types and are now defined in | |
| 6184 | + the file :file:`qpdf/Constants.h`. This enables them to be | |
| 6185 | + shared by both the C and C++ interfaces. | |
| 6127 | 6186 | |
| 6128 | 6187 | 2.0.6: May 3, 2009 |
| 6129 | 6188 | - Do not attempt to uncompress streams that have decode parameters |
| ... | ... | @@ -6165,91 +6224,6 @@ For a detailed list of changes, please see the file |
| 6165 | 6224 | 2.0: April 29, 2008 |
| 6166 | 6225 | - First public release. |
| 6167 | 6226 | |
| 6168 | -.. _ref.upgrading-to-2.1: | |
| 6169 | - | |
| 6170 | -Upgrading from 2.0 to 2.1 | |
| 6171 | -========================= | |
| 6172 | - | |
| 6173 | -Although, as a general rule, we like to avoid introducing source-level | |
| 6174 | -incompatibilities in qpdf's interface, there were a few non-compatible | |
| 6175 | -changes made in this version. A considerable amount of source code that | |
| 6176 | -uses qpdf will probably compile without any changes, but in some cases, | |
| 6177 | -you may have to update your code. The changes are enumerated here. There | |
| 6178 | -are also some new interfaces; for those, please refer to the header | |
| 6179 | -files. | |
| 6180 | - | |
| 6181 | -- QPDF's exception handling mechanism now uses ``std::logic_error`` for | |
| 6182 | - internal errors and ``std::runtime_error`` for runtime errors in | |
| 6183 | - favor of the now removed ``QEXC`` classes used in previous versions. | |
| 6184 | - The ``QEXC`` exception classes predated the addition of the | |
| 6185 | - :file:`<stdexcept>` header file to the C++ | |
| 6186 | - standard library. Most of the exceptions thrown by the qpdf library | |
| 6187 | - itself are still of type ``QPDFExc`` which is now derived from | |
| 6188 | - ``std::runtime_error``. Programs that caught an instance of | |
| 6189 | - ``std::exception`` and displayed it by calling the ``what()`` method | |
| 6190 | - will not need to be changed. | |
| 6191 | - | |
| 6192 | -- The ``QPDFExc`` class now internally represents various fields of the | |
| 6193 | - error condition and provides interfaces for querying them. Among the | |
| 6194 | - fields is a numeric error code that can help applications act | |
| 6195 | - differently on (a small number of) different error conditions. See | |
| 6196 | - :file:`QPDFExc.hh` for details. | |
| 6197 | - | |
| 6198 | -- Warnings can be retrieved from qpdf as instances of ``QPDFExc`` | |
| 6199 | - instead of strings. | |
| 6200 | - | |
| 6201 | -- The nested ``QPDF::EncryptionData`` class's constructor takes an | |
| 6202 | - additional argument. This class is primarily intended to be used by | |
| 6203 | - ``QPDFWriter``. There's not really anything useful an end-user | |
| 6204 | - application could do with it. It probably shouldn't really be part of | |
| 6205 | - the public interface to begin with. Likewise, some of the methods for | |
| 6206 | - computing internal encryption dictionary parameters have changed to | |
| 6207 | - support ``/R=4`` encryption. | |
| 6208 | - | |
| 6209 | -- The method ``QPDF::getUserPassword`` has been removed since it didn't | |
| 6210 | - do what people would think it did. There are now two new methods: | |
| 6211 | - ``QPDF::getPaddedUserPassword`` and ``QPDF::getTrimmedUserPassword``. | |
| 6212 | - The first one does what the old ``QPDF::getUserPassword`` method used | |
| 6213 | - to do, which is to return the password with possible binary padding | |
| 6214 | - as specified by the PDF specification. The second one returns a | |
| 6215 | - human-readable password string. | |
| 6216 | - | |
| 6217 | -- The enumerated types that used to be nested in ``QPDFWriter`` have | |
| 6218 | - moved to top-level enumerated types and are now defined in the file | |
| 6219 | - :file:`qpdf/Constants.h`. This enables them to be | |
| 6220 | - shared by both the C and C++ interfaces. | |
| 6221 | - | |
| 6222 | -.. _ref.upgrading-to-3.0: | |
| 6223 | - | |
| 6224 | -Upgrading to 3.0 | |
| 6225 | -================ | |
| 6226 | - | |
| 6227 | -For the most part, the API for qpdf version 3.0 is backward compatible | |
| 6228 | -with versions 2.1 and later. There are two exceptions: | |
| 6229 | - | |
| 6230 | -- The method ``QPDFObjectHandle::replaceStreamData`` that uses a | |
| 6231 | - ``StreamDataProvider`` to provide the stream data no longer takes a | |
| 6232 | - ``length`` parameter. While it would have been easy enough to keep | |
| 6233 | - the parameter for backward compatibility, in this case, the parameter | |
| 6234 | - was removed since this provides the user an opportunity to simplify | |
| 6235 | - the calling code. This method was introduced in version 2.2. At the | |
| 6236 | - time, the ``length`` parameter was required in order to ensure that | |
| 6237 | - calls to the stream data provider returned the same length for a | |
| 6238 | - specific stream every time they were invoked. In particular, the | |
| 6239 | - linearization code depends on this. Instead, qpdf 3.0 and newer check | |
| 6240 | - for that constraint explicitly. The first time the stream data | |
| 6241 | - provider is called for a specific stream, the actual length is saved, | |
| 6242 | - and subsequent calls are required to return the same number of bytes. | |
| 6243 | - This means the calling code no longer has to compute the length in | |
| 6244 | - advance, which can be a significant simplification. If your code | |
| 6245 | - fails to compile because of the extra argument and you don't want to | |
| 6246 | - make other changes to your code, just omit the argument. | |
| 6247 | - | |
| 6248 | -- Many methods take ``long long`` instead of other integer types. Most | |
| 6249 | - if not all existing code should compile fine with this change since | |
| 6250 | - such parameters had always previously been smaller types. This change | |
| 6251 | - was required to support files larger than two gigabytes in size. | |
| 6252 | - | |
| 6253 | 6227 | .. _acknowledgments: |
| 6254 | 6228 | |
| 6255 | 6229 | Acknowledgment | ... | ... |