aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
AgeCommit message (Collapse)Author
2022-01-30Add basic framework for QPDFJob code generationJay Berkenbilt
2022-01-30QPDFJob increment: move arg parsing into QPDFJobJay Berkenbilt
Move ArgParser from qpdf.cc into QPDFJob.cc. It still works with millions of public member variables, but now qpdf.cc is minimal and just calls stable library functions.
2022-01-30QPDFJob: reorder functions, no other changesJay Berkenbilt
2022-01-30QPDFJob increment: static functions to member functionsJay Berkenbilt
Convert remaining static functions that take QPDFJob& as a parameter to member functions. Utility functions that don't take QPDFJob& remain static functions and can probably just stay that way since the keep extra complexity out of QPDFJob.hh.
2022-01-30QPDFJob: de-templatize do_process and do_process_onceJay Berkenbilt
2022-01-30QPDFJob increment: remove std::cout, std::cerr, whoamiJay Berkenbilt
Remove remaining temporary duplication of hard-coded values and direct access to std::cout, std::cerr, and whoami in favor of parameters in QPDFJob. This moves a few more static methods into QPDFJob member functions.
2022-01-30QPDFJob increment: get rid of exit, handle verboseJay Berkenbilt
Remove all calls to exit() from QPDFJob. Handle code that runs in verbose mode to enable it to make use of output streams and message prefix (whoami) from QPDFJob. This removes temporarily duplicated exit code logic and most access to whoami/std::cout outside of QPDFJob proper.
2022-01-30QPDFJob increment: basic QPDFJob structureJay Berkenbilt
Move most of the methods called from qpdf.cc after argument parsing into QPDFJob. In this increment, enough QPDFJob API has been added to handle the branch of QPDFJob::run() that creates output with an appropriate division between qpdf.cc and QPDFJob. There are temporary bits of code to enable everything to compile and pass the test suite, including some duplication and hard-coded values.
2022-01-30Implement QPDFArgParser based on ArgParser from qpdf.ccJay Berkenbilt
2022-01-30Fix doc typosm-holger
2022-01-27Fix QPDFObjectHandle::isOrHasNamem-holger
Ensure isOrHasName returns true if object is an array and the name is present anywhere in the array.
2022-01-27Remove some if statements and simplify some boolean expressionsm-holger
Use QPDFObjectHandle::isNameAndEquals, isDictionaryOfType and isStreamOfType.
2022-01-27Allow testing for subtype without specifying type in isDictionaryOfType etcm-holger
Accept empty string as type parameter in QPDFObjectHandle::isDictionaryOfType and isStreamOfType to allow for dictionaries with optional type.
2022-01-22Make a few whitespace fixes from last commitm-holger
Commit by ejb@ql.org using m-holger as author so git annotate gives proper credit for changes.
2022-01-22Add new convenience methods QPDFObjectHandle::isNameAndEquals, etcm-holger
Add methods isNameAndEquals, isDictionaryOfType, isStreamOfType
2022-01-11Add missing characters from PDF doc encoding (fixes #606)Jay Berkenbilt
2022-01-11Fix signed/unsigned char warning (fixes #604)Jay Berkenbilt
2021-12-29Add QUtil::file_can_be_openedJay Berkenbilt
2021-12-20Prepare 10.5.0 releaseJay Berkenbilt
2021-12-20Change names of qpdf_object_type_e enumerationsJay Berkenbilt
They have to be ot_* rather than qpdf_ot_* for compatibility. * Different enumerated types are not assignment-compatible in C++, at least with strict compiler settings * While you can do `constexpr ot_xyz = ::qpdf_ot_xyz` in QPDFObject.hh to make QPDFObject::ot_xyz work, QPDFObject::object_type_e::ot_xyz will only work if the enumerated type names are the same.
2021-12-19Further improvements to handling binary stringsJay Berkenbilt
2021-12-17C API: simplify new error handling and improve documentationJay Berkenbilt
2021-12-17C-API expose QPDFObjectHandle::getTypeCode and getTypeName (fixes #597)m-holger
2021-12-17C API: add several stream functions (fixes #596)Jay Berkenbilt
2021-12-17Add Pl_Buffer::getMallocBufferJay Berkenbilt
2021-12-16C API: add functions for working with pages (fixes #594)Jay Berkenbilt
2021-12-16Use value rather than reference captures where possibleJay Berkenbilt
2021-12-10Handle bitstream overflow errors more gracefully (fixes #581)Jay Berkenbilt
* Make it a runtime error, not a logic error * Include additional information * Capture it properly in checkLinearization
2021-12-10C API: expose functions for indirect objects (fixes #588)Jay Berkenbilt
2021-12-10C API: overhaul error handlingJay Berkenbilt
* Handle error conditions that occur when using the object handle interfaces. In the past, some exceptions were not correctly converted to errors or warnings. * Add more detailed information to qpdf-c.h * Make it possible to work more explicitly with uninitialized objects
2021-12-10Use a specific error code for type warnings and clarify docsJay Berkenbilt
2021-12-10Add missing unit test for register progress reporter in C APIJay Berkenbilt
It was exercised in the pdf-linearize example but not in qpdf-ctest.
2021-12-09Refactor trap_errors to use std::functionJay Berkenbilt
2021-12-09C API: qpdf_oh_is_initializedJay Berkenbilt
2021-12-09C API: qpdf_get_last_string_lengthJay Berkenbilt
2021-12-02C-API expose new_object as qpdf_oh_new_objectm-holger
2021-11-29Improve testing and error handling around operating before processingJay Berkenbilt
2021-11-29Initialize QPDF::Members::file (fixes #584)Jay Berkenbilt
2021-11-19Ensure qpdf_oh handles returned by C-API functions are unique.m-holger
Return new qpdf_oh from qpdf_oh_wrap_in_array when input is already an array. Update some doc comments in qpdf-c.h.
2021-11-16Prepare 10.4.0 releaserelease-qpdf-10.4.0Jay Berkenbilt
2021-11-11First increment of improving handling of weak crypto (fixes #358)Jay Berkenbilt
2021-11-07Make recovery logic flexible about where objects end (fixes #573)Jay Berkenbilt
Don't assume endobj is at the beginning of the line. This means we are looking at tokens for every line, but the odds of n n obj appearing in the middle of the object are likely much lower than endobj not being at the beginning of the line or missing entirely. This will probably have a negative impact on recovery time for very large files. Hopefully it will be worth it.
2021-11-04Support OpenSSL 3 (fixes #568)Jay Berkenbilt
2021-11-04Add range check in QPDFNumberTreeObjectHelper (fuzz issue 37740)Jay Berkenbilt
2021-11-04Fix bug in merging resources /DR from foreign AcroForm (fixes #548)Jay Berkenbilt
When making resources indirect in from_dr, the code was using the wrong owning QPDF, forgetting that from_dr had already been copied using CopyForeignObject.
2021-11-04Check object ownership when addingJay Berkenbilt
When adding a QPDFObjectHandle to an array or dictionary, if possible, check if the new object belongs to the same QPDF. This makes it much easier to find incorrect code than waiting for the situation to be detected when the file is written.
2021-11-03Make QPDF::findPage public (fixes #516)Jay Berkenbilt
This was originally not public because I wanted to get rid fo the pages cache, but I recently realized there were deep reasons not to do that, and the author of pikepdf wanted this, so I decided to make it public.
2021-11-03Detect recoverable but invalid zlib data streams (fixes #562)Jay Berkenbilt
2021-09-10Fix QPDFEFStreamObjectHelper::{get,set}SubtypeFredrik Fornwall
The /Subtype entry that specifies the mime type of an embedded file is inside the embedded file stream dictionary directly, not it in the parameter dictionary. See Table 45 and 46 in the PDF 1.7 specification: https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf#page=112
2021-05-09Performance fix on preserveObjectStreamsJay Berkenbilt