diff --git a/manual/qpdf-manual.xml b/manual/qpdf-manual.xml index c1ac5e15..4f3b54ae 100644 --- a/manual/qpdf-manual.xml +++ b/manual/qpdf-manual.xml @@ -4414,6 +4414,161 @@ print "\n"; + + + CLI Enhancements + + + + + The instructs + qpdf to recompress streams that are + already compressed with /FlateDecode. + Useful with . + + + + + the + + sets the zlib compression level used for any streams + compressed by /FlateDecode. Most + effective when combined with + . + + + + + + + Library Enhancements + + + + + A new namespace QIntC, provided by + qpdf/QIntC.hh, provides safe conversion + methods between different integer types. These conversion + methods do range checking to ensure that the cast can be + performed with no loss of information. Every use of + static_cast in the library was + inspected to see if it could use one of these safe + converters instead. See for + additional details. + + + + + New methods have been added to QUtil + for converting back and forth between strings and unsigned + integers: uint_to_string, + uint_to_string_base, + string_to_uint, and + string_to_ull. + + + + + New methods have been added to + QPDFObjectHandle that return the + value of Integer objects as + int or unsigned int with range + checking and sensible fallback values, and a new method was + added to return an unsigned value. This makes it easier to + write code that is safe from unintentional data loss. + Functions: getUIntValue, + getIntVauleAsInt, + getUIntValueAsUInt. + + + + + When parsing content streams with + QPDFObjectHandle::ParserCallbacks, in + place of the method + handleObject(QPDFObjectHandle), the + developer may override + handleObject(QPDFObjectHandle, size_t offset, + size_t length). If this method is defined, it + will be invoked with the object along with its offset and + length within the overall contents being parsed. Intervening + spaces and comments are not included in offset and length. + Additionally, a new method + contentSize(size_t) may be implemented. + If present, it will be called prior to the first call to + handleObject with the total size in + bytes of the combined contents. + + + + + New methods QPDF::userPasswordMatched + and QPDF::ownerPasswordMatched have + been added to enable a caller to determine whether the + supplied password was the user password, the owner password, + or both. This information is also displayed by qpdf + --show-encryption and qpdf + --check. + + + + + Static method + Pl_Flate::setCompressionLevel can be + called to set the zlib compression level globally used by + all instances of Pl_Flate in deflate mode. + + + + + The method + QPDFWriter::setRecompressFlate can be + called to tell QPDFWriter to + uncompress and recompress streams already compressed with + /FlateDecode. + + + + + The underlying implementation of QPDF arrays has been + enhanced to be much more memory efficient when dealing with + arrays with lots of nulls. This enables qpdf to use + drastically less memory for certain types of files. + + + + + When traversing the pages tree, if nodes are encountered + with invalid types, the types are fixed, and a warning is + issued. + + + + + A new helper method + QUtil::read_file_into_memory was added. + + + + + All conditions previously reported by + QPDF::checkLinearization() as errors + are now presented as warnings. + + + + + Name tokens containing the # character + not preceded by two hexadecimal digits, which is invalid in + PDF 1.2 and above, are properly handled by the library: a + warning is generated, and the name token is properly + preserved, even if invalid, in the output. See + ChangeLog for a more complete + description of this change. + + + + Bug Fixes @@ -4518,154 +4673,6 @@ print "\n"; - - - Library and CLI Enhancements - - - - - A new namespace QIntC, provided by - qpdf/QIntC.hh, provides safe conversion - methods between different integer types. These conversion - methods do range checking to ensure that the cast can be - performed with no loss of information. Every use of - static_cast in the library was - inspected to see if it could use one of these safe - converters instead. See for - additional details. - - - - - New methods have been added to QUtil - for converting back and forth between strings and unsigned - integers: uint_to_string, - uint_to_string_base, - string_to_uint, and - string_to_ull. - - - - - New methods have been added to - QPDFObjectHandle that return the - value of Integer objects as - int or unsigned int with range - checking and sensible fallback values, and a new method was - added to return an unsigned value. This makes it easier to - write code that is safe from unintentional data loss. - Functions: getUIntValue, - getIntVauleAsInt, - getUIntValueAsUInt. - - - - - When parsing content streams with - QPDFObjectHandle::ParserCallbacks, in - place of the method - handleObject(QPDFObjectHandle), the - developer may override - handleObject(QPDFObjectHandle, size_t offset, - size_t length). If this method is defined, it - will be invoked with the object along with its offset and - length within the overall contents being parsed. Intervening - spaces and comments are not included in offset and length. - Additionally, a new method - contentSize(size_t) may be implemented. - If present, it will be called prior to the first call to - handleObject with the total size in - bytes of the combined contents. - - - - - New methods QPDF::userPasswordMatched - and QPDF::ownerPasswordMatched have - been added to enable a caller to determine whether the - supplied password was the user password, the owner password, - or both. This information is also displayed by qpdf - --show-encryption and qpdf - --check. - - - - - Static method - Pl_Flate::setCompressionLevel can be - called to set the zlib compression level globally used by - all instances of Pl_Flate in deflate mode. - - - - - The method - QPDFWriter::setRecompressFlate can be - called to tell QPDFWriter to - uncompress and recompress streams already compressed with - /FlateDecode. - - - - - CLI enhancement: the - instructs qpdf to recompress streams that - are already compressed with /FlateDecode. - Useful with . - - - - - CLI enhancement: the - - sets the zlib compression level used for any streams - compressed by /FlateDecode. Most - effective when combined with - . - - - - - The underlying implementation of QPDF arrays has been - enhanced to be much more memory efficient when dealing with - arrays with lots of nulls. This enables qpdf to use - drastically less memory for certain types of files. - - - - - When traversing the pages tree, if nodes are encountered - with invalid types, the types are fixed, and a warning is - issued. - - - - - A new helper method - QUtil::read_file_into_memory was added. - - - - - All conditions previously reported by - QPDF::checkLinearization() as errors - are now presented as warnings. - - - - - Name tokens containing the # character - not preceded by two hexadecimal digits, which is invalid in - PDF 1.2 and above, are properly handled by the library: a - warning is generated, and the name token is properly - preserved, even if invalid, in the output. See - ChangeLog for a more complete - description of this change. - - - - Other Notes