pkgsrc/print/qpdf/PLIST

52 lines
1.4 KiB
Text
Raw Normal View History

@comment $NetBSD: PLIST,v 1.7 2018/11/07 12:59:44 ryoon Exp $
Import qpdf-4.0.1 as print/qpdf, packaged by dillo@. QPDF is a command-line program that does structural, content-preserving transformations on PDF files. It could have been called something like pdf-to-pdf. It also provides many useful capabilities to developers of PDF-producing software or for people who just want to look at the innards of a PDF file to learn more about how they work. QPDF is capable of creating linearized (also known as web-optimized) files and encrypted files. It is also capable of converting PDF files with object streams (also known as compressed objects) to files with no compressed objects or to generate object streams from files that don't have them (or even those that already do). QPDF also supports a special mode designed to allow you to edit the content of PDF files in a text editor. For more details, please see the documentation links below. QPDF includes support for merging and splitting PDFs through the ability to copy objects from one PDF file into another and to manipulate the list of pages in a PDF file. The QPDF library also makes it possible for you to create PDF files from scratch. In this mode, you are responsible for supplying all the contents of the file, while the QPDF library takes care off all the syntactical representation of the objects, creation of cross references tables and, if you use them, object streams, encryption, linearization, and other syntactic details. QPDF is not a PDF content creation library, a PDF viewer, or a program capable of converting PDF into other formats. In particular, QPDF knows nothing about the semantics of PDF content streams. If you are looking for something that can do that, you should look elsewhere. However, once you have a valid PDF file, QPDF can be used to transform that file in ways perhaps your original PDF creation can't handle. For example, programs generate simple PDF files but can't password-protect them, web-optimize them, or perform other transformations of that type.
2013-01-31 22:45:23 +01:00
bin/fix-qdf
bin/qpdf
bin/zlib-flate
include/qpdf/Buffer.hh
include/qpdf/BufferInputSource.hh
Update to 8.1.0 Changelog: 8.1.0: June 23, 2018 Usability Improvements When splitting files, qpdf detects fonts and images that the document metadata claims are referenced from a page but are not actually referenced and omits them from the output file. This change can cause a significant reduction in the size of split PDF files for files created by some software packages. Prior versions of qpdf would believe the document metadata and sometimes include all the images from all the other pages even though the pages were no longer present. In the unlikely event that the old behavior should be desired, it can be enabled by specifying --preserve-unreferenced-resources. For additional details, please see Section 3.6, “Advanced Transformation Options”. When merging multiple PDF files, qpdf no longer leaves all the files open. This makes it possible to merge numbers of files that may exceed the operating system's limit for the maximum number of open files. The --rotate option's syntax has been extended to make the page range optional. If you specify --rotate=angle without specifying a page range, the rotation will be applied to all pages. This can be especially useful for adjusting a PDF created from a multi-page document that was scanned upside down. When merging multiple files, the --verbose option now prints information about each file as it operates on that file. When the --progress option is specified, qpdf will print a running indicator of its best guess at how far through the writing process it is. Note that, as with all progress meters, it's an approximation. This option is implemented in a way that makes it useful for software that uses the qpdf library; see API Enhancements below. Bug Fixes Properly decrypt files that use revision 3 of the standard security handler but use 40 bit keys (even though revision 3 supports 128-bit keys). Limit depth of nested data structures to prevent crashes from certain types of malformed (malicious) PDFs. In “newline before endstream” mode, insert the required extra newline before the endstream at the end of object streams. This one case was previously omitted. API Enhancements The first round of higher level “helper” interfaces has been introduced. These are designed to provide a more convenient way of interacting with certain document features than using QPDFObjectHandle directly. For details on helpers, see Section 6.3, “Helper Classes”. Specific additional interfaces are described below. Add two new document helper classes: QPDFPageDocumentHelper for working with pages, and QPDFAcroFormDocumentHelper for working with interactive forms. No old methods have been removed, but QPDFPageDocumentHelper is now the preferred way to perform operations on pages rather than calling the old methods in QPDFObjectHandle and QPDF directly. Comments in the header files direct you to the new interfaces. Please see the header files and ChangeLog for additional details. Add three new object helper class: QPDFPageObjectHelper for pages, QPDFFormFieldObjectHelper for interactive form fields, and QPDFAnnotationObjectHelper for annotations. All three classes are fairly sparse at the moment, but they have some useful, basic functionality. A new example program examples/pdf-set-form-values.cc has been added that illustrates use of the new document and object helpers. The method QPDFWriter::registerProgressReporter has been added. This method allows you to register a function that is called by QPDFWriter to update your idea of the percentage it thinks it is through writing its output. Client programs can use this to implement reasonably accurate progress meters. The qpdf command line tool uses this to implement its --progress option. New methods QPDFObjectHandle::newUnicodeString and QPDFObject::unparseBinary have been added to allow for more convenient creation of strings that are explicitly encoded using big-endian UTF-16. This is useful for creating strings that appear outside of content streams, such as labels, form fields, outlines, document metadata, etc. A new class QPDFObjectHandle::Rectangle has been added to ease working with PDF rectangles, which are just arrays of four numeric values.
2018-07-16 01:37:37 +02:00
include/qpdf/ClosedFileInputSource.hh
Import qpdf-4.0.1 as print/qpdf, packaged by dillo@. QPDF is a command-line program that does structural, content-preserving transformations on PDF files. It could have been called something like pdf-to-pdf. It also provides many useful capabilities to developers of PDF-producing software or for people who just want to look at the innards of a PDF file to learn more about how they work. QPDF is capable of creating linearized (also known as web-optimized) files and encrypted files. It is also capable of converting PDF files with object streams (also known as compressed objects) to files with no compressed objects or to generate object streams from files that don't have them (or even those that already do). QPDF also supports a special mode designed to allow you to edit the content of PDF files in a text editor. For more details, please see the documentation links below. QPDF includes support for merging and splitting PDFs through the ability to copy objects from one PDF file into another and to manipulate the list of pages in a PDF file. The QPDF library also makes it possible for you to create PDF files from scratch. In this mode, you are responsible for supplying all the contents of the file, while the QPDF library takes care off all the syntactical representation of the objects, creation of cross references tables and, if you use them, object streams, encryption, linearization, and other syntactic details. QPDF is not a PDF content creation library, a PDF viewer, or a program capable of converting PDF into other formats. In particular, QPDF knows nothing about the semantics of PDF content streams. If you are looking for something that can do that, you should look elsewhere. However, once you have a valid PDF file, QPDF can be used to transform that file in ways perhaps your original PDF creation can't handle. For example, programs generate simple PDF files but can't password-protect them, web-optimize them, or perform other transformations of that type.
2013-01-31 22:45:23 +01:00
include/qpdf/Constants.h
include/qpdf/DLL.h
include/qpdf/FileInputSource.hh
include/qpdf/InputSource.hh
include/qpdf/Pipeline.hh
include/qpdf/Pl_Buffer.hh
include/qpdf/Pl_Concatenate.hh
include/qpdf/Pl_Count.hh
include/qpdf/Pl_DCT.hh
Import qpdf-4.0.1 as print/qpdf, packaged by dillo@. QPDF is a command-line program that does structural, content-preserving transformations on PDF files. It could have been called something like pdf-to-pdf. It also provides many useful capabilities to developers of PDF-producing software or for people who just want to look at the innards of a PDF file to learn more about how they work. QPDF is capable of creating linearized (also known as web-optimized) files and encrypted files. It is also capable of converting PDF files with object streams (also known as compressed objects) to files with no compressed objects or to generate object streams from files that don't have them (or even those that already do). QPDF also supports a special mode designed to allow you to edit the content of PDF files in a text editor. For more details, please see the documentation links below. QPDF includes support for merging and splitting PDFs through the ability to copy objects from one PDF file into another and to manipulate the list of pages in a PDF file. The QPDF library also makes it possible for you to create PDF files from scratch. In this mode, you are responsible for supplying all the contents of the file, while the QPDF library takes care off all the syntactical representation of the objects, creation of cross references tables and, if you use them, object streams, encryption, linearization, and other syntactic details. QPDF is not a PDF content creation library, a PDF viewer, or a program capable of converting PDF into other formats. In particular, QPDF knows nothing about the semantics of PDF content streams. If you are looking for something that can do that, you should look elsewhere. However, once you have a valid PDF file, QPDF can be used to transform that file in ways perhaps your original PDF creation can't handle. For example, programs generate simple PDF files but can't password-protect them, web-optimize them, or perform other transformations of that type.
2013-01-31 22:45:23 +01:00
include/qpdf/Pl_Discard.hh
include/qpdf/Pl_Flate.hh
Update to 8.0.0 Changelog: 2018-02-25 Jay Berkenbilt <ejb@ql.org> * 8.0.0: release 2018-02-17 Jay Berkenbilt <ejb@ql.org> * Fix QPDFObjectHandle::getUTF8Val() to properly handle strings that are encoded with PDF Doc Encoding. Fixes #179. * Add qpdf_check_pdf to the "C" API. This method just attempts to read the entire file and produce no output, making possible to assess whether the file has any errors that qpdf can detect. * Major enhancements to handling of type errors within the qpdf library. This fix is intended to eliminate those annoying cases where qpdf would exit with a message like "operation for dictionary object attemped on object of wrong type" without providing any context. Now qpdf keeps enough context to be able to issue a proper warning and to handle such conditions in a sensible way. This should greatly increase the number of bad files that qpdf can recover, and it should make it much easier to figure out what's broken when a file contains errors. * Error message fix: replace "file position" with "offset" in error messages that report lexical or parsing errors. Sometimes it's an offset in an object stream or a content stream rather than a file position, so this makes the error message less confusing in those cases. It still requires some knowledge to find the exact position of the error, since when it's not a file offset, it's probably an offset into a stream after uncompressing it. * Error message fix: correct some cases in which the object that contained a lexical error was omitted from the error message. * Error message fix: improve file name in the error message when there is a parser error inside an object stream. 2018-02-11 Jay Berkenbilt <ejb@ql.org> * Add QPDFObjectHandle::filterPageContents method to provide a different interface for applying token filters to page contents without modifying the ultimate output. 2018-02-04 Jay Berkenbilt <ejb@ql.org> * Changes listed on today's date are numerous and reflect significant enhancements to qpdf's lexical layer. While many nuances are discussed and a handful of small bugs were fixed, it should be emphasized that none of these issues have any impact on any output or behavior of qpdf under "normal" operation. There are some changes that have an effect on content stream normalization as with qdf mode or on code that interacts with PDF files lexically using QPDFTokenizer. There are no incompatible changes for normal operation. There are a few changes that will affect the exact error messages issued on certain bad files, and there is a small non-compatible enhancement regarding the behavior of manually constructed QPDFTokenizer::Token objects. Users of the qpdf command line tool will see no changes other than the addition of a new command-line flag and possibly some improved error messages. * Significant lexer (tokenizer) enhancements. These are changes to the QPDFTokenizer class. These changes are of concern only to people who are operating with PDF files at the lexical layer using qpdf. They have little or no impact on most high-level interfaces or the command-line tool. New token types tt_space and tt_comment to recognize whitespace and comments. this makes it possible to tokenize a PDF file or stream and preserve everything about it. For backward compatibility, space and comment tokens are not returned by the tokenizer unless QPDFTokenizer.includeIgnorable() is called. Better handling of null bytes. These are now included in space tokens rather than being their own "tt_word" tokens. This should have no impact on any correct PDF file and has no impact on output, but it may change offsets in some error messages when trying to parse contents of bad files. Under default operation, qpdf does not attempt to parse content streams, so this change is mostly invisible. Bug fix to handling of bad tokens at ends of streams. Now, when allowEOF() has been called, these are treated as bad tokens (tt_bad or an exception, depending on invocation), and a separate tt_eof token is returned. Before the bad token contents were returned as the value of a tt_eof token. tt_eof tokens are always empty now. Fix a bug that would, on rare occasions, report the offset in an error message in the wrong space because of spaces or comments adjacent to a bad token. Clarify in comments exactly where the input source is positioned surrounding calls to readToken and getToken. * Add a new token type for inline images. This token type is only returned by QPDFTokenizer immediately following a call to expectInlineImage(). This change includes internal refactoring of a handful of places that all separately handled inline images, The logic of detecting inline images in content streams is now handled in one place in the code. Also we are more flexible about what characters may surround the EI operator that marks the end of an inline image. * New method QPDFObjectHandle::parsePageContents() to improve upon QPDFObjectHandle::parseContentStream(). The parseContentStream method used to operate on a single content stream, but was fixed to properly handle pages with contents split across multiple streams in an earlier release. The new method parsePageContents() can be called on the page object rather than the value of the page dictionary's /Contents key. This removes a few lines of boiler-plate code from any code that uses parseContentStream, and it also enables creation of more helpful error messages if problems are encountered as the error messages can include information about which page the streams come from. * Update content stream parsing example (examples/pdf-parse-content.cc) to use new QPDFObjectHandle::parsePageContents() method in favor of the older QPDFObjectHandle::parseContentStream() method. * Bug fix: change where the trailing newline is added to a stream in QDF mode when content normalization is enabled (the default for QDF mode). Before, the content normalizer ensured that the output ended with a trailing newline, but this had the undesired side effect of including the newline in the stream data for purposes of length computation. QPDFWriter already appends a newline without counting in length for better readability. Ordinarily this makes no difference, but in the rare case of a page's contents being split in the middle of a token, the old behavior could cause the extra newline to be interprted as part of the token. This bug could only be triggered in qdf mode, which is a mode intended for manual inspection of PDF files' contents, so it is very unlikely to have caused any actual problems for people using qpdf for production use. Even if it did, it would be very unusual for a PDF file to actually be adversely affected by this issue. * Add support for coalescing a page's contents into a single stream if they are represented as an array of streams. This can be performed from the command line using the --coalesce-contents option. Coalescing content streams can simplify things for software that wants to operate on a page's content streams without having to handle weird edge cases like content streams split in the middle of tokens. Note that QPDFObjectHandle::parsePageContents and QPDFObjectHandle::parseContentStream already handled split content streams. This is mainly to set the stage for new methods of operating on page contents. The new method QPDFObjectHandle::pipeContentStreams will pipe all of a page's content streams though a single pipeline. The new method QPDFObjectHandle.coalesceContentStreams, when called on a page object, will do nothing if the page's contents are a single stream, but if they are an array of streams, it will replace the page's contents with a single stream whose contents are the concatenation of the original streams. * A few library routines throw exceptions if called on non-page objects. These constraints have been relaxed somewhat to make qpdf more tolerant of files whose page dictionaries are not properly marked as such. Mostly exceptions about page operations being called on non page objects will only be thrown in cases where the operation had no chance of succeeding anyway. This change has no impact on any default mode operations, but it could allow applications that use page-level APIs in QPDFObjectHandle to be more tolerant of certain types of damaged files. * Add QPDFObjectHandle::TokenFilter class and methods to use it to perform lexical filtering on content streams. You can call QPDFObjectHandle::addTokenFilter on stream object, or you can call the higher level QPDFObjectHandle::addContentTokenFilter on a page object to cause the stream's contents to passed through a token filter while being retrieved by QPDFWriter or any other consumer. For details on using TokenFilter, please see comments in QPDFObjectHandle.hh. * Enhance the string, type QPDFTokenizer::Token constructor to initialize a raw value in addition to a value. Tokens have a value, which is a canonical representation, and a raw value. For all tokens except strings and names, the raw value and the value are the same. For strings, the value excludes the outer delimiters and has non-printing characters normalized. For names, the value resolves non-printing characters. In order to better facilitate token filters that mostly preserve contents and to enable developers to be mostly unconcerned about the nuances of token values and raw values, creating string and name tokens now properly handles this subtlety of values and raw values. When constructing string tokens, take care to avoid passing in the outer delimiters. This has always been the case, but it is now clarified in comments in QPDFObjectHandle.hh::TokenFilter. This has no impact on any existing code unless there's some code somewhere that was relying on Token::getRawValue() returning an empty string for a manually constructed token. The token class's operator== method still only looks at type and value, not raw value. For example, string tokens for <41> and (A) would still be equal because both are representations of the string "A". * Add QPDFObjectHandle::isDataModified method. This method just returns true if addTokenFilter has been called on the stream. It enables a caller to determine whether it is safe to optimize away piping of stream data in cases where the input and output are expected to be the same. QPDFWriter uses this internally to skip the optimization of not re-compressing already compressed streams if addTokenFilter has been called. Most developers will not have to worry about this as it is used internally in the library in the places that need it. If you are manually retrieving stream data with QPDFObjectHandle::getStreamData or QPDFObjectHandle::pipeStreamData, you don't need to worry about this at all. * Provide heavily annoated examples/pdf-filter-tokens.cc example that illustrates use of some simple token filters. * When normalizing content streams, as in qdf mode, issue warning about bad tokens. Content streams are only normalized when this is explicitly requested, so this has no impact on normal operation. However, in qdf mode, if qpdf detects a bad token, it means that either there's a bug in qpdf's lexer, that the file is damaged, or that the page's contents are split in a weird way. In any of those cases, qpdf could potentially damage the stream's contents by replacing carrige returns with newlines or otherwise messing with spaces. The mostly likely case of this would be an inline image's compressed data being divided across two streams and having the compressed data in the second stream contain a carriage return as part of its binary data. If you are using qdf mode just to look at PDF files in text editors, this usually doesn't matter. In cases of contents split across multiple streams, coalescing streams would eliminate the problem, so the warning mentions this. Prior to this enhancement, the chances of qdf mode writing incorrect data were already very low. This change should make it nearly impossible for qdf mode to unknowingly write invalid data. 2018-02-04 Jay Berkenbilt <ejb@ql.org> * Add QPDFWriter::setLinearizationPass1Filename method and --linearize-pass1 command line option to allow specification of a file into which QPDFWriter will write its intermediate linearization pass 1 file. This is useful only for debugging qpdf. qpdf creates linearized files by computing the output in two passes. Ordinarily the first pass is discarded and not written anywhere. This option allows it to be inspected.
2018-02-27 13:37:20 +01:00
include/qpdf/Pl_QPDFTokenizer.hh
include/qpdf/Pl_RunLength.hh
Import qpdf-4.0.1 as print/qpdf, packaged by dillo@. QPDF is a command-line program that does structural, content-preserving transformations on PDF files. It could have been called something like pdf-to-pdf. It also provides many useful capabilities to developers of PDF-producing software or for people who just want to look at the innards of a PDF file to learn more about how they work. QPDF is capable of creating linearized (also known as web-optimized) files and encrypted files. It is also capable of converting PDF files with object streams (also known as compressed objects) to files with no compressed objects or to generate object streams from files that don't have them (or even those that already do). QPDF also supports a special mode designed to allow you to edit the content of PDF files in a text editor. For more details, please see the documentation links below. QPDF includes support for merging and splitting PDFs through the ability to copy objects from one PDF file into another and to manipulate the list of pages in a PDF file. The QPDF library also makes it possible for you to create PDF files from scratch. In this mode, you are responsible for supplying all the contents of the file, while the QPDF library takes care off all the syntactical representation of the objects, creation of cross references tables and, if you use them, object streams, encryption, linearization, and other syntactic details. QPDF is not a PDF content creation library, a PDF viewer, or a program capable of converting PDF into other formats. In particular, QPDF knows nothing about the semantics of PDF content streams. If you are looking for something that can do that, you should look elsewhere. However, once you have a valid PDF file, QPDF can be used to transform that file in ways perhaps your original PDF creation can't handle. For example, programs generate simple PDF files but can't password-protect them, web-optimize them, or perform other transformations of that type.
2013-01-31 22:45:23 +01:00
include/qpdf/Pl_StdioFile.hh
include/qpdf/PointerHolder.hh
include/qpdf/QPDF.hh
Update to 8.1.0 Changelog: 8.1.0: June 23, 2018 Usability Improvements When splitting files, qpdf detects fonts and images that the document metadata claims are referenced from a page but are not actually referenced and omits them from the output file. This change can cause a significant reduction in the size of split PDF files for files created by some software packages. Prior versions of qpdf would believe the document metadata and sometimes include all the images from all the other pages even though the pages were no longer present. In the unlikely event that the old behavior should be desired, it can be enabled by specifying --preserve-unreferenced-resources. For additional details, please see Section 3.6, “Advanced Transformation Options”. When merging multiple PDF files, qpdf no longer leaves all the files open. This makes it possible to merge numbers of files that may exceed the operating system's limit for the maximum number of open files. The --rotate option's syntax has been extended to make the page range optional. If you specify --rotate=angle without specifying a page range, the rotation will be applied to all pages. This can be especially useful for adjusting a PDF created from a multi-page document that was scanned upside down. When merging multiple files, the --verbose option now prints information about each file as it operates on that file. When the --progress option is specified, qpdf will print a running indicator of its best guess at how far through the writing process it is. Note that, as with all progress meters, it's an approximation. This option is implemented in a way that makes it useful for software that uses the qpdf library; see API Enhancements below. Bug Fixes Properly decrypt files that use revision 3 of the standard security handler but use 40 bit keys (even though revision 3 supports 128-bit keys). Limit depth of nested data structures to prevent crashes from certain types of malformed (malicious) PDFs. In “newline before endstream” mode, insert the required extra newline before the endstream at the end of object streams. This one case was previously omitted. API Enhancements The first round of higher level “helper” interfaces has been introduced. These are designed to provide a more convenient way of interacting with certain document features than using QPDFObjectHandle directly. For details on helpers, see Section 6.3, “Helper Classes”. Specific additional interfaces are described below. Add two new document helper classes: QPDFPageDocumentHelper for working with pages, and QPDFAcroFormDocumentHelper for working with interactive forms. No old methods have been removed, but QPDFPageDocumentHelper is now the preferred way to perform operations on pages rather than calling the old methods in QPDFObjectHandle and QPDF directly. Comments in the header files direct you to the new interfaces. Please see the header files and ChangeLog for additional details. Add three new object helper class: QPDFPageObjectHelper for pages, QPDFFormFieldObjectHelper for interactive form fields, and QPDFAnnotationObjectHelper for annotations. All three classes are fairly sparse at the moment, but they have some useful, basic functionality. A new example program examples/pdf-set-form-values.cc has been added that illustrates use of the new document and object helpers. The method QPDFWriter::registerProgressReporter has been added. This method allows you to register a function that is called by QPDFWriter to update your idea of the percentage it thinks it is through writing its output. Client programs can use this to implement reasonably accurate progress meters. The qpdf command line tool uses this to implement its --progress option. New methods QPDFObjectHandle::newUnicodeString and QPDFObject::unparseBinary have been added to allow for more convenient creation of strings that are explicitly encoded using big-endian UTF-16. This is useful for creating strings that appear outside of content streams, such as labels, form fields, outlines, document metadata, etc. A new class QPDFObjectHandle::Rectangle has been added to ease working with PDF rectangles, which are just arrays of four numeric values.
2018-07-16 01:37:37 +02:00
include/qpdf/QPDFAcroFormDocumentHelper.hh
include/qpdf/QPDFAnnotationObjectHelper.hh
include/qpdf/QPDFDocumentHelper.hh
Import qpdf-4.0.1 as print/qpdf, packaged by dillo@. QPDF is a command-line program that does structural, content-preserving transformations on PDF files. It could have been called something like pdf-to-pdf. It also provides many useful capabilities to developers of PDF-producing software or for people who just want to look at the innards of a PDF file to learn more about how they work. QPDF is capable of creating linearized (also known as web-optimized) files and encrypted files. It is also capable of converting PDF files with object streams (also known as compressed objects) to files with no compressed objects or to generate object streams from files that don't have them (or even those that already do). QPDF also supports a special mode designed to allow you to edit the content of PDF files in a text editor. For more details, please see the documentation links below. QPDF includes support for merging and splitting PDFs through the ability to copy objects from one PDF file into another and to manipulate the list of pages in a PDF file. The QPDF library also makes it possible for you to create PDF files from scratch. In this mode, you are responsible for supplying all the contents of the file, while the QPDF library takes care off all the syntactical representation of the objects, creation of cross references tables and, if you use them, object streams, encryption, linearization, and other syntactic details. QPDF is not a PDF content creation library, a PDF viewer, or a program capable of converting PDF into other formats. In particular, QPDF knows nothing about the semantics of PDF content streams. If you are looking for something that can do that, you should look elsewhere. However, once you have a valid PDF file, QPDF can be used to transform that file in ways perhaps your original PDF creation can't handle. For example, programs generate simple PDF files but can't password-protect them, web-optimize them, or perform other transformations of that type.
2013-01-31 22:45:23 +01:00
include/qpdf/QPDFExc.hh
Update to 8.1.0 Changelog: 8.1.0: June 23, 2018 Usability Improvements When splitting files, qpdf detects fonts and images that the document metadata claims are referenced from a page but are not actually referenced and omits them from the output file. This change can cause a significant reduction in the size of split PDF files for files created by some software packages. Prior versions of qpdf would believe the document metadata and sometimes include all the images from all the other pages even though the pages were no longer present. In the unlikely event that the old behavior should be desired, it can be enabled by specifying --preserve-unreferenced-resources. For additional details, please see Section 3.6, “Advanced Transformation Options”. When merging multiple PDF files, qpdf no longer leaves all the files open. This makes it possible to merge numbers of files that may exceed the operating system's limit for the maximum number of open files. The --rotate option's syntax has been extended to make the page range optional. If you specify --rotate=angle without specifying a page range, the rotation will be applied to all pages. This can be especially useful for adjusting a PDF created from a multi-page document that was scanned upside down. When merging multiple files, the --verbose option now prints information about each file as it operates on that file. When the --progress option is specified, qpdf will print a running indicator of its best guess at how far through the writing process it is. Note that, as with all progress meters, it's an approximation. This option is implemented in a way that makes it useful for software that uses the qpdf library; see API Enhancements below. Bug Fixes Properly decrypt files that use revision 3 of the standard security handler but use 40 bit keys (even though revision 3 supports 128-bit keys). Limit depth of nested data structures to prevent crashes from certain types of malformed (malicious) PDFs. In “newline before endstream” mode, insert the required extra newline before the endstream at the end of object streams. This one case was previously omitted. API Enhancements The first round of higher level “helper” interfaces has been introduced. These are designed to provide a more convenient way of interacting with certain document features than using QPDFObjectHandle directly. For details on helpers, see Section 6.3, “Helper Classes”. Specific additional interfaces are described below. Add two new document helper classes: QPDFPageDocumentHelper for working with pages, and QPDFAcroFormDocumentHelper for working with interactive forms. No old methods have been removed, but QPDFPageDocumentHelper is now the preferred way to perform operations on pages rather than calling the old methods in QPDFObjectHandle and QPDF directly. Comments in the header files direct you to the new interfaces. Please see the header files and ChangeLog for additional details. Add three new object helper class: QPDFPageObjectHelper for pages, QPDFFormFieldObjectHelper for interactive form fields, and QPDFAnnotationObjectHelper for annotations. All three classes are fairly sparse at the moment, but they have some useful, basic functionality. A new example program examples/pdf-set-form-values.cc has been added that illustrates use of the new document and object helpers. The method QPDFWriter::registerProgressReporter has been added. This method allows you to register a function that is called by QPDFWriter to update your idea of the percentage it thinks it is through writing its output. Client programs can use this to implement reasonably accurate progress meters. The qpdf command line tool uses this to implement its --progress option. New methods QPDFObjectHandle::newUnicodeString and QPDFObject::unparseBinary have been added to allow for more convenient creation of strings that are explicitly encoded using big-endian UTF-16. This is useful for creating strings that appear outside of content streams, such as labels, form fields, outlines, document metadata, etc. A new class QPDFObjectHandle::Rectangle has been added to ease working with PDF rectangles, which are just arrays of four numeric values.
2018-07-16 01:37:37 +02:00
include/qpdf/QPDFFormFieldObjectHelper.hh
Update to 5.0.1: 2013-10-18 Jay Berkenbilt <ejb@ql.org> * 5.0.1: release * Warn when -accessibility=n is specified with a modern encryption format (R > 3). Also, accept this flag (and ignore with warning) with 256-bit encryption. qpdf has always ignored the accessibility setting with R > 3, but it previously did so silently. 2013-10-05 Jay Berkenbilt <ejb@ql.org> * Replace operator[] in std::string and std::vector with "at" in order to get bounds checking. This reduces the chances that incorrect code will result in data exposure or buffer overruns. See README.hardening for additional notes. * Use cryptographically secure random number generation when available. See additional notes in README. * Replace some assert() calls with std::logic_error exceptions. Ideally there shouldn't be assert() calls outside of testing. This change may make a few more potential code errors in handling invalid data recoverable. * Security fix: In places where std::vector<T>(size_t) was used, either validate that the size parameter is sane or refactor code to avoid the need to pre-allocate the vector. This reduces the likelihood of allocating a lot of memory in response to invalid data in linearization hint streams. * Security fix: sanitize /W array in cross reference stream to avoid a potential integer overflow in a multiplication. It is unlikely that any exploits were possible from this bug as additional checks were also performed. * Security fix: avoid buffer overrun that could be caused by bogus data in linearization hint streams. The incorrect code could only be triggered when checking linearization data, which must be invoked explicitly. qpdf does not check linearization data when reading or writing linearized files, but the qpdf --check command does check linearization data. * Security fix: properly handle empty strings in QPDF_Name::normalizeName. The empty string is not a valid name and would never be parsed as a name, so there were no known conditions where this method could be called with an empty string. * Security fix: perform additional argument sanity checks when reading bit streams. * Security fix: in QUtil::toUTF8, change bounds checking to avoid having a pointer point temporarily outside the bounds of an array. Some compiler optimizations could have made the original code unsafe. 2013-07-10 Jay Berkenbilt <ejb@ql.org> * 5.0.0: release * 4.2.0 turned out to be binary incompatible on some platforms even though there were no changes to the public API. Therefore the 4.2.0 release has been withdrawn, and is being replaced with a 5.0.0 release that acknowledges the ABI change and also removes some problematic methods from the public API. * Remove methods from public API that were only intended to be used by QPDFWriter and really didn't make sense to call from anywhere else as they required internal knowledge that only QPDFWriter had: - QPDF::getLinearizedParts - QPDF::generateHintStream - QPDF::getObjectStreamData - QPDF::getCompressibleObjGens - QPDF::getCompressibleObjects 2013-07-07 Jay Berkenbilt <ejb@ql.org> * 4.2.0: release [withdrawn] * Ignore error case of a stream's decode parameters having invalid length when there are no stream filters. * qpdf: add --show-npages command-line option, which causes the number of pages in the input file to be printed on a line by itself. * qpdf: allow omission of range in --pages. If range is omitted such that an argument that is supposed to be a range is an invalid range and a valid file name, the range of 1-z is assumed. This makes it possible to merge a bunch of files with something like qpdf --empty out.pdf --pages *.pdf -- 2013-06-15 Jay Berkenbilt <ejb@ql.org> * Handle some additional broken files with missing /ID in trailer for encrypted files and with space rather than newline after xref. 2013-06-14 Jay Berkenbilt <ejb@ql.org> * Detect and correct /Outlines dictionary being a direct object when linearizing files. This is not allowed by the spec but has been seen in the wild. Prior to this change, such a file would cause an internal error in the linearization code, which assumed /Outlines was indirect. * Add /Length key to crypt filter dictionary for encrypted files. This key is optional, but some version of MacOS reportedly fail to open encrypted PDF files without this key. * Bug fix: properly handle object stream generation when the original file has some compressible objects with generation != 0. * Add QPDF::getCompressibleObjGens() and deprecate QPDF::getCompressibleObjects(), which had a flaw in its logic. * Add new QPDFObjectHandle::getObjGen() method and indiciate in comments that its use is favored over getObjectID() and getGeneration() for most cases. * Add new QPDFObjGen object to represent an object ID/generation pair. 2013-04-14 Jay Berkenbilt <ejb@ql.org> * 4.1.0: release 2013-03-25 Jay Berkenbilt <ejb@ql.org> * manual/qpdf-manual.xml: Document the casting policy that is followed in qpdf's implementation. 2013-03-11 Jay Berkenbilt <ejb@ql.org> * When creating Windows binary distributions, make sure to only copy DLLs of the correct type. The ensures that the 32-bit distributions contain 32-bit DLLs and the 64-bit distributions contain 64-bit DLLs. 2013-03-07 Jay Berkenbilt <ejb@ql.org> * Use ./install-sh (already present) instead of "install -c" to install executables to fix portability problems against different UNIX variants. 2013-03-03 Jay Berkenbilt <ejb@ql.org> * Add protected terminateParsing method to QPDFObjectHandle::ParserCallbacks that implementor can call to terminate parsing of a content stream. 2013-02-28 Jay Berkenbilt <ejb@ql.org> * Favor fopen_s and strerror_s on MSVC to avoid CRT security warnings. This is useful for people who may want to use qpdf in an application that is Windows 8 certified. * New method QUtil::safe_fopen to wrap calls to fopen. This is less cumbersome than calling QUtil::fopen_wrapper. * Remove all calls to sprintf * New method QUtil::int_to_string_base to convert to octal or hexademical (or decimal) strings without using sprintf 2013-02-26 Jay Berkenbilt <ejb@ql.org> * Rewrite QUtil::int_to_string and QUtil::double_to_string to remove internal length limits but to remain backward compatible with the old versions for valid inputs. 2013-02-23 Jay Berkenbilt <ejb@ql.org> * Bug fix: properly handle overridden compressed objects. When caching objects from an object stream, only cache objects that, based on the xref table, would actually be resolved into this stream. Prior to this fix, if an object stream A contained an object B that was overridden by an appended section of the file, qpdf would cache the old value of B if any non-overridden member of A was accessed before B. This commit fixes that bug. 2013-01-31 Jay Berkenbilt <ejb@ql.org> * Do not remove libtool's .la file during the make install step. Note to packagers: if your distribution wants to you remove the .la file, you will have to do that yourself now. 2013-01-25 Jay Berkenbilt <ejb@ql.org> * New method QUtil::hex_encode to encode binary data as a hexadecimal string * qpdf --check was exiting with status 0 in some rare cases even when errors were found. It now always exits with one of the document error codes (0 for success, 2 for errors, 3 or warnings). 2013-01-24 Jay Berkenbilt <ejb@ql.org> * Make --enable-werror work for MSVC, and generally handle warning options better for that compiler. Warning flags for that compiler were previous hard-coded into the build with /WX enabled unconditionally. * Split warning flags into WFLAGS in autoconf.mk to make them easier to override. Before they were repeated in CFLAGS and CXXFLAGS and were commingled with other compiler flags. * qpdf --check now does syntactic checks all pages' content streams as well as checking overall document structure. Semantic errors are still not checked, and there are no plans to add semantic checks. 2013-01-22 Jay Berkenbilt <ejb@ql.org> * Add QPDFObjectHandle::getTypeCode(). This method returns a unique integer (enumerated type) value corresponding to the object type of the QPDFObjectHandle. It can be used as an alternative to the QPDFObjectHandle::is* methods for type testing, particularly where there is a desire to use a switch statement or optimize for performance when testing object types. * Add QPDFObjectHandle::getTypeName(). This method returns a string literal describing the object type. It is useful for testing and debugging. 2013-01-20 Jay Berkenbilt <ejb@ql.org> * Add QPDFObjectHandle::parseContentStream, which parses the objects in a content stream and calls handlers in a callback class. The example pdf-parse-content illustrates it use. * Add QPDF_Operator and QPDF_InlineImage types along with appropriate wrapper methods in QPDFObjectHandle. These new object types are to facilitate content stream parsing.
2013-10-23 11:07:27 +02:00
include/qpdf/QPDFObjGen.hh
Import qpdf-4.0.1 as print/qpdf, packaged by dillo@. QPDF is a command-line program that does structural, content-preserving transformations on PDF files. It could have been called something like pdf-to-pdf. It also provides many useful capabilities to developers of PDF-producing software or for people who just want to look at the innards of a PDF file to learn more about how they work. QPDF is capable of creating linearized (also known as web-optimized) files and encrypted files. It is also capable of converting PDF files with object streams (also known as compressed objects) to files with no compressed objects or to generate object streams from files that don't have them (or even those that already do). QPDF also supports a special mode designed to allow you to edit the content of PDF files in a text editor. For more details, please see the documentation links below. QPDF includes support for merging and splitting PDFs through the ability to copy objects from one PDF file into another and to manipulate the list of pages in a PDF file. The QPDF library also makes it possible for you to create PDF files from scratch. In this mode, you are responsible for supplying all the contents of the file, while the QPDF library takes care off all the syntactical representation of the objects, creation of cross references tables and, if you use them, object streams, encryption, linearization, and other syntactic details. QPDF is not a PDF content creation library, a PDF viewer, or a program capable of converting PDF into other formats. In particular, QPDF knows nothing about the semantics of PDF content streams. If you are looking for something that can do that, you should look elsewhere. However, once you have a valid PDF file, QPDF can be used to transform that file in ways perhaps your original PDF creation can't handle. For example, programs generate simple PDF files but can't password-protect them, web-optimize them, or perform other transformations of that type.
2013-01-31 22:45:23 +01:00
include/qpdf/QPDFObject.hh
include/qpdf/QPDFObjectHandle.hh
Update to 8.1.0 Changelog: 8.1.0: June 23, 2018 Usability Improvements When splitting files, qpdf detects fonts and images that the document metadata claims are referenced from a page but are not actually referenced and omits them from the output file. This change can cause a significant reduction in the size of split PDF files for files created by some software packages. Prior versions of qpdf would believe the document metadata and sometimes include all the images from all the other pages even though the pages were no longer present. In the unlikely event that the old behavior should be desired, it can be enabled by specifying --preserve-unreferenced-resources. For additional details, please see Section 3.6, “Advanced Transformation Options”. When merging multiple PDF files, qpdf no longer leaves all the files open. This makes it possible to merge numbers of files that may exceed the operating system's limit for the maximum number of open files. The --rotate option's syntax has been extended to make the page range optional. If you specify --rotate=angle without specifying a page range, the rotation will be applied to all pages. This can be especially useful for adjusting a PDF created from a multi-page document that was scanned upside down. When merging multiple files, the --verbose option now prints information about each file as it operates on that file. When the --progress option is specified, qpdf will print a running indicator of its best guess at how far through the writing process it is. Note that, as with all progress meters, it's an approximation. This option is implemented in a way that makes it useful for software that uses the qpdf library; see API Enhancements below. Bug Fixes Properly decrypt files that use revision 3 of the standard security handler but use 40 bit keys (even though revision 3 supports 128-bit keys). Limit depth of nested data structures to prevent crashes from certain types of malformed (malicious) PDFs. In “newline before endstream” mode, insert the required extra newline before the endstream at the end of object streams. This one case was previously omitted. API Enhancements The first round of higher level “helper” interfaces has been introduced. These are designed to provide a more convenient way of interacting with certain document features than using QPDFObjectHandle directly. For details on helpers, see Section 6.3, “Helper Classes”. Specific additional interfaces are described below. Add two new document helper classes: QPDFPageDocumentHelper for working with pages, and QPDFAcroFormDocumentHelper for working with interactive forms. No old methods have been removed, but QPDFPageDocumentHelper is now the preferred way to perform operations on pages rather than calling the old methods in QPDFObjectHandle and QPDF directly. Comments in the header files direct you to the new interfaces. Please see the header files and ChangeLog for additional details. Add three new object helper class: QPDFPageObjectHelper for pages, QPDFFormFieldObjectHelper for interactive form fields, and QPDFAnnotationObjectHelper for annotations. All three classes are fairly sparse at the moment, but they have some useful, basic functionality. A new example program examples/pdf-set-form-values.cc has been added that illustrates use of the new document and object helpers. The method QPDFWriter::registerProgressReporter has been added. This method allows you to register a function that is called by QPDFWriter to update your idea of the percentage it thinks it is through writing its output. Client programs can use this to implement reasonably accurate progress meters. The qpdf command line tool uses this to implement its --progress option. New methods QPDFObjectHandle::newUnicodeString and QPDFObject::unparseBinary have been added to allow for more convenient creation of strings that are explicitly encoded using big-endian UTF-16. This is useful for creating strings that appear outside of content streams, such as labels, form fields, outlines, document metadata, etc. A new class QPDFObjectHandle::Rectangle has been added to ease working with PDF rectangles, which are just arrays of four numeric values.
2018-07-16 01:37:37 +02:00
include/qpdf/QPDFObjectHelper.hh
include/qpdf/QPDFPageDocumentHelper.hh
include/qpdf/QPDFPageObjectHelper.hh
include/qpdf/QPDFSystemError.hh
Import qpdf-4.0.1 as print/qpdf, packaged by dillo@. QPDF is a command-line program that does structural, content-preserving transformations on PDF files. It could have been called something like pdf-to-pdf. It also provides many useful capabilities to developers of PDF-producing software or for people who just want to look at the innards of a PDF file to learn more about how they work. QPDF is capable of creating linearized (also known as web-optimized) files and encrypted files. It is also capable of converting PDF files with object streams (also known as compressed objects) to files with no compressed objects or to generate object streams from files that don't have them (or even those that already do). QPDF also supports a special mode designed to allow you to edit the content of PDF files in a text editor. For more details, please see the documentation links below. QPDF includes support for merging and splitting PDFs through the ability to copy objects from one PDF file into another and to manipulate the list of pages in a PDF file. The QPDF library also makes it possible for you to create PDF files from scratch. In this mode, you are responsible for supplying all the contents of the file, while the QPDF library takes care off all the syntactical representation of the objects, creation of cross references tables and, if you use them, object streams, encryption, linearization, and other syntactic details. QPDF is not a PDF content creation library, a PDF viewer, or a program capable of converting PDF into other formats. In particular, QPDF knows nothing about the semantics of PDF content streams. If you are looking for something that can do that, you should look elsewhere. However, once you have a valid PDF file, QPDF can be used to transform that file in ways perhaps your original PDF creation can't handle. For example, programs generate simple PDF files but can't password-protect them, web-optimize them, or perform other transformations of that type.
2013-01-31 22:45:23 +01:00
include/qpdf/QPDFTokenizer.hh
include/qpdf/QPDFWriter.hh
include/qpdf/QPDFXRefEntry.hh
include/qpdf/QTC.hh
include/qpdf/QUtil.hh
Update 5.0.1 to 5.1.2 --------------------- 2014-06-07 Jay Berkenbilt <ejb@ql.org> * 5.1.2: release * MS Visual C++ build: explicitly target Windows 5.0.1 (XP) * New example program: pdf-split-pages: efficiently split PDF files into individual pages. * Bug fix: don't fail on files that contain streams where /Filter or /DecodeParms references a stream. Before, qpdf would try to convert these to direct objects, which would fail because of the stream. 2014-02-22 Jay Berkenbilt <ejb@ql.org> * Bug fix: if the last object in the first part of a linearized file had an offset that was below 65536 by less than the size of the hint stream, the xref stream was invalid and the resulting file is not usable. This is now fixed. 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 2013-12-16 Jay Berkenbilt <ejb@ql.org> * Document and make explicit that passing null to QUtil::setRandomDataProvider() resets the random data provider. * Provide QUtil::getRandomDataProvider(). 2013-12-14 Jay Berkenbilt <ejb@ql.org> * Allow anyspace rather than just newline to follow xref header. This allows qpdf to read a wider range of damaged files. 2013-11-30 Jay Berkenbilt <ejb@ql.org> * Allow user-supplied random data provider to be used in place of OS-provided or insecure random number generation. See documentation for 5.1.0 for details. * Add configure option --enable-os-secure-random (enabled by default). Pass --disable-os-secure-random or define SKIP_OS_SECURE_RANDOM to avoid attempts to use the operating system-provided secure random number generation. This can be especially useful on Windows if you wish to avoid any dependency on Microsoft's cryptography system. 2013-11-29 Jay Berkenbilt <ejb@ql.org> * If NO_GET_ENVIRONMENT is #defined, for Windows only, QUtil::get_env will always return false. This was added to support a user who needs to avoid calling GetEnvironmentVariable from the Windows API. QUtil::get_env is not used for any functionality in qpdf and exists only to support the test suite including test coverage support with QTC (part of qtest). * Add /FS to msvc builds to allow parallel builds to work with Visual C++ 2013. * Add missing #include <algorithm> in some files that use std::min and std::max. 2013-11-21 Jay Berkenbilt <ejb@ql.org> * Change image comparison tests, which are disabled by default, to use tiff files with 8 bits per sample rather than 4. This works around a bug in tiffcmp but also increases time and disk space for image comparison tests. 2013-10-28 Jay Berkenbilt <ejb@ql.org> * Fix MacOS compilation errors by adding a missing #include <string> in a header file.
2015-01-26 12:54:17 +01:00
include/qpdf/RandomDataProvider.hh
Import qpdf-4.0.1 as print/qpdf, packaged by dillo@. QPDF is a command-line program that does structural, content-preserving transformations on PDF files. It could have been called something like pdf-to-pdf. It also provides many useful capabilities to developers of PDF-producing software or for people who just want to look at the innards of a PDF file to learn more about how they work. QPDF is capable of creating linearized (also known as web-optimized) files and encrypted files. It is also capable of converting PDF files with object streams (also known as compressed objects) to files with no compressed objects or to generate object streams from files that don't have them (or even those that already do). QPDF also supports a special mode designed to allow you to edit the content of PDF files in a text editor. For more details, please see the documentation links below. QPDF includes support for merging and splitting PDFs through the ability to copy objects from one PDF file into another and to manipulate the list of pages in a PDF file. The QPDF library also makes it possible for you to create PDF files from scratch. In this mode, you are responsible for supplying all the contents of the file, while the QPDF library takes care off all the syntactical representation of the objects, creation of cross references tables and, if you use them, object streams, encryption, linearization, and other syntactic details. QPDF is not a PDF content creation library, a PDF viewer, or a program capable of converting PDF into other formats. In particular, QPDF knows nothing about the semantics of PDF content streams. If you are looking for something that can do that, you should look elsewhere. However, once you have a valid PDF file, QPDF can be used to transform that file in ways perhaps your original PDF creation can't handle. For example, programs generate simple PDF files but can't password-protect them, web-optimize them, or perform other transformations of that type.
2013-01-31 22:45:23 +01:00
include/qpdf/Types.h
include/qpdf/qpdf-c.h
lib/libqpdf.la
lib/pkgconfig/libqpdf.pc
man/man1/fix-qdf.1
man/man1/qpdf.1
man/man1/zlib-flate.1
share/doc/qpdf/qpdf-manual.html
share/doc/qpdf/qpdf-manual.pdf
share/doc/qpdf/stylesheet.css