aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf
AgeCommit message (Collapse)Author
2022-09-26Fix edge case in character encoding (fixes #778)Jay Berkenbilt
Avoid representing as PDF Doc encoding any string whose PDF Doc encoding representation starts with a UTF-16 or UTF-8 marker.
2022-09-23Add code to CI to verify signed/unsigned charJay Berkenbilt
Make sure that our attempt to test both signed and unsigned char is actually right.
2022-09-21Replace calls to QUtil::int_to_string with std::to_stringm-holger
2022-09-13Remove explicit direct object check from getObjectJay Berkenbilt
An indirect object reference to 0, 0 is invalid. If it appears in the file or is parsed from a string, the parser catches it. This check would only be useful for someone explicitly calling getObject with 0, 0, and that would trigger an error during resolve().
2022-09-12Remove obsolete LL_FMT check from build (fixes #768)Jay Berkenbilt
This was broken for cross-compilation and has probably been unnecessary for several years now. Also fix extraneous whitespace in related some tests.
2022-09-10Change QPDFObjectHandle == to isSameObjectAsJay Berkenbilt
Replace operator== and operator!=, which were testing for the same underlying object, with isSameObjectAs. This change was motivated by the fact that pikepdf internally had its own operator== method for QPDFObjectHandle that did structural comparison. I backed out qpdf's operator== as a courtesy to pikepdf (in my own testing) but also because I think people might naturally assume that operator== does a structural comparison, and isSameObjectAs is clearer in its intent.
2022-09-09Add C API functions for using custom loggersJay Berkenbilt
Expose functions to the C API to create new loggers and to setLogger and getLogger for QPDF and QPDFJob.
2022-09-09Fix tests with GNU grep 3.8Andreas Stieger
GNU grep 3.8 started to emit warnings when invoking egrep. Convert all calls to grep -E.
2022-09-09Add JSON v2 support to C APIJay Berkenbilt
2022-09-08Change reset to disconnect and clarify commentsJay Berkenbilt
I decided that it's actually fine to copy a direct object to another QPDF. Even if we eventually prevent a QPDFObject from having multiple parents, this could happen if an object is moved.
2022-09-08Create a special "destroyed" type rather than using nullJay Berkenbilt
When a QPDF is destroyed, changing indirect objects to direct nulls makes them effectively disappear silently when they sneak into other places. Instead, we should treat this as an error. Adding a destroyed object type makes this possible.
2022-09-08Clear owning QPDF information for all objects, not just indirectJay Berkenbilt
2022-09-08Update QPDFObject with commentJay Berkenbilt
Also, since it's just there for compatibility, we don't need to add new object types to it.
2022-09-08Remove unneeded owning_qpdf from QPDFValueJay Berkenbilt
The qpdf member was already sufficient. Removing this actually fixed a few pre-existing issues around detecting foreign ownership and allowing certain conditions to be warnings rather than exceptions.
2022-09-07Fix typoJay Berkenbilt
2022-09-07Clarify and improve QPDFPageObjectHelper::get*Box methodsJay Berkenbilt
Add copy_if_fallback and explain how it differs from copy_if_shared.
2022-09-07Implement QPDFObjectHandle equalityJay Berkenbilt
2022-09-06Support --show-encryption without a valid password (fixes #598)Jay Berkenbilt
2022-09-06Re-introduce QPDFObject.hh as deprecatedJay Berkenbilt
* Just removing a header file would cause build errors with no hint as to what happened. This way, people get a warning rather than error for the life of qpdf 11, and the warning tells them what to do. * This avoids build surprises resulting from having two versions of QPDF headers installed at once. If you were building code out of a checkout of qpdf but had an older version installed on your system, if your code included <qpdf/QPDFObject.hh>, everything would work, but then your code would break without QPDFObject.hh later.
2022-09-02Add workaround for bug in ghostscript 9.56 (fixes #732)Jay Berkenbilt
2022-09-02Disallow --empty with --replace-input (fixes #728)Jay Berkenbilt
2022-09-02Disable copying/assigning to QPDF objects, add QPDF::create()Jay Berkenbilt
2022-09-02Stop including QPDFObject.hh from other than private filesJay Berkenbilt
This required moving some newly inlined functions back to the cc file, but that seems to have had no measurable performance impact.
2022-09-02Remove QPDFObject::object_type_e as alias for qpdf_object_type_eJay Berkenbilt
2022-09-01Add a file with arrays with lots of nulls to the test suiteJay Berkenbilt
A bug was fixed between qpdf 8.4.2 and 9.0.0 regarding this type of file (see #305 and #311), but it was necessary to retest after some major refactoring work at the lexical and parsing layers. This lays the groundwork for including this in performance benchmarks and in the qpdf test suite rather than having to keep a large, non-redistributable file around. 20 arrays of 20K nulls is plenty for performance memory testing and doesn't take too long to run. Compared to qpdf 8.4.2, in qpdf 11.0.0, the file generated here uses 3% of the RAM and runs over 4 times faster.
2022-09-01Merge pull request #730 from m-holger/allpagesJay Berkenbilt
Tidy QPDF::getAllPagesInternal and QPDF::pushInheritedAttributesToPageInternal
2022-09-01Reset QPDFValue::qpdf and QPDFValue::og when the owning QPDF object gets ↵m-holger
destroyed
2022-09-01Remove QPDFObjectHandle::newIndirectm-holger
Modify QPDFParser::parse to call QPDF::getObject instead.
2022-09-01Modify QPDF::getObject to not to resolve the objectm-holger
2022-08-30Move QPDFObjectHandle::parseInternal to new class QPDFParserm-holger
Part of #729
2022-08-25Integrate names into state machine in QPDFTokenizerm-holger
2022-08-25Refactor QPDFTokenizer::inHexstringm-holger
2022-08-01Fix warnings in QPDF::getAllPagesInternalm-holger
2022-08-01Tune QPDF::getAllPagesInternalm-holger
Avoid calling getAllPagesInternal for each /Page object.
2022-07-31Provide a simpler QPDF::writeJSONJay Berkenbilt
2022-07-31Use calledgetallpages and pushedinheritedpageresourcesJay Berkenbilt
2022-07-31Change the output of --json to use "qpdf" instead of "objects"Jay Berkenbilt
2022-07-31Change --json-output formatJay Berkenbilt
from "qpdf-v2" to "qpdf": [..., ...]
2022-07-24Tweak "AndGet" mutator functions againJay Berkenbilt
Remove any ambiguity around whether old or new value is being returned.
2022-07-24Overload StreamDataProvider::provideStreamDatam-holger
Use 'QPDFObjGen const&' instead of 'int, int' in signature.
2022-06-27Refactor QPDFObject creation and cloningm-holger
Move responsibility for creating shared pointers to objects and cloning from QPDFObjectHandle to QPDFObject.
2022-06-25Track whether certain page modifying methods have been calledJay Berkenbilt
We need to know whether pushInheritedAttributesToPage or getAllPages have been called when generating JSON output. When reading the JSON back in, we have to call the same methods so that object numbers will line up properly.
2022-06-25Add warnings for some additional page tree repairJay Berkenbilt
2022-06-19Add Pl_Function -- a generic function pipelineJay Berkenbilt
2022-06-19Add qpdfjob_register_progress_reporterJay Berkenbilt
2022-06-19Add QPDFJob::registerProgressReporterJay Berkenbilt
2022-06-19Move C-based ProgressReporter helper into QPDFWriterJay Berkenbilt
2022-06-19Add more flexible funtions to qpdfjob C APIJay Berkenbilt
2022-06-18Use the default logger for other writes to stdout/stderrJay Berkenbilt
When there is no context for writing output or error messages, use the default logger.
2022-06-18Use "save" logger when saving data to standard outputJay Berkenbilt
This includes the output PDF, streams from --show-object and attachments from --save-attachment. This also enables --verbose and --progress to work with saving to stdout.