aboutsummaryrefslogtreecommitdiffstats
path: root/examples
AgeCommit message (Collapse)Author
2022-02-07Update for clean compile with POINTERHOLDER_TRANSITION=2Jay Berkenbilt
2022-02-07Tidy example CLI usagem-holger
Change "-" to "--" for named parameters. Remove spaces inside "[ option ]" for optional parameters. Fix "pdf-mod-info --dump file" to match usage message.
2022-02-05Add operator ""_qpdf for creating QPDFObjectHandle literalsJay Berkenbilt
2022-02-04Replace containers of PointerHolder with containers of std::shared_ptrJay Berkenbilt
None of these are in the public API.
2022-02-02Fix some doc typosm-holger
2022-02-01QPDFJob: let initializeFromArgv just take argv, not argcJay Berkenbilt
Let argv be a null-terminated array. There is already code that assumes this, and it makes it easier to construct the arguments.
2022-02-01Finish QPDFJob examples and add tests for themJay Berkenbilt
2022-02-01QPDFJob: documentationJay Berkenbilt
2022-01-31QPDFJob: add checkConfiguration to ConfigJay Berkenbilt
2022-01-30Placeholder QPDFJob exampleJay Berkenbilt
2022-01-27Remove some if statements and simplify some boolean expressionsm-holger
Use QPDFObjectHandle::isNameAndEquals, isDictionaryOfType and isStreamOfType.
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-03-05QPDFAcroFormDocumentHelper: add missing analyze callsJay Berkenbilt
2021-03-04Major rework of handling form fields when copying pages (fixes #509)Jay Berkenbilt
2021-02-25Update examples to use copyStream()Jay Berkenbilt
2021-02-23Remove accidentally-committed file and fix test that created itJay Berkenbilt
2021-02-23Update pdf-overlay-page example to copy annotationsJay Berkenbilt
2021-02-22Change from QPDF{Array,Dict}Items to aitems() and ditems()Jay Berkenbilt
2021-02-18Use QUtil::path_basenameJay Berkenbilt
2021-02-18Add file attachment exampleJay Berkenbilt
2021-02-13QUtil::double_to_string: trim trailing zeroes with option to disableJay Berkenbilt
2021-02-10Minor clean up of Windows headersJay Berkenbilt
2021-02-08Make newly created name/number trees indirect objectsJay Berkenbilt
2021-01-31Improve memory safety of dict/array iteratorsJay Berkenbilt
2021-01-30Add example of name/number trees and dictionary/array iterationJay Berkenbilt
2021-01-30Update examples to use QPDFObjectHandle iteratorsJay Berkenbilt
2021-01-24QPDFObjectHandle::newUnicodeString to uses UTF-16 only when neededJay Berkenbilt
Use the first of ASCII, PDFDocEncoding, or UTF-16 that is capable of encoding the string.
2021-01-04Spell checkJay Berkenbilt
2021-01-02Make more QPDFPageObjectHelper methods work with form XObjectJay Berkenbilt
2021-01-02QPDFPageObjectHelper: filterPageContents -> filterContents + form XObjectJay Berkenbilt
2021-01-02QPDFPageObjectHelper: getPageImages -> getImagesJay Berkenbilt
2020-12-28Add pdf-custom-filter exampleJay Berkenbilt
2020-12-20Provide qpdf write progress reporting from C API (fixes #487)Jay Berkenbilt
2020-11-29Add QPDFObjectHandle manipulation to C APIJay Berkenbilt
2020-04-16Fix warnings reported by -Wshadow=local (fixes #431)Jay Berkenbilt
2020-04-09Fix typo in test case nameJay Berkenbilt
2020-04-09Fix memory leak in pdf-invert-imagesJay Berkenbilt
A class can't have a PointerHolder to itself since PointerHolder doesn't have the concept of weak references.
2020-04-08Improve pdf-invert-images exampleJay Berkenbilt
2020-02-22Mention appearances in pdf-set-form-values exampleJay Berkenbilt
2019-08-23Pass offset and length to ParserCallbacks::handleObjectJay Berkenbilt
2019-07-04Change list to vector for outline helpers (fixes #297)Thorsten Schöning
This change works around STL problems with Embarcadero C++ Builder version 10.2, but std::vector is more common than std::list in qpdf, and this is a relatively new API, so an API change is tolerable. Thanks to Thorsten Schöning <6223655+ams-tschoening@users.noreply.github.com> for the fix.
2019-06-22Add missing #include <cstring>Jay Berkenbilt
2019-06-21Fix sign and conversion warnings (major)Jay Berkenbilt
This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with MSVC. This significantly reduces the likelihood of potential crashes from bogus integer values. There are some parts of the code that take int when they should take size_t or an offset. Such places would make qpdf not support files with more than 2^31 of something that usually wouldn't be so large. In the event that such a file shows up and is valid, at least qpdf would raise an error in the right spot so the issue could be legitimately addressed rather than failing in some weird way because of a silent overflow condition.
2019-03-12Undefined functions because of missing std:: or header. (#295)Thorsten Schöning
* [bcc32 Error] QPDF.cc(375): E2268 Call to undefined function 'atof' Full parser context QPDF.cc(358): parsing: void QPDF::parse(const char *) * [bcc32 Error] QPDFTokenizer.cc(183): E2268 Call to undefined function 'strtol' Full parser context QPDFTokenizer.cc(163): parsing: void QPDFTokenizer::resolveLiteral() * [bcc32 Error] pdf-split-pages.cc(52): E2268 Call to undefined function 'exit' Full parser context pdf-split-pages.cc(50): parsing: void usage() * PR #295: Including "cstdlib" should be replaced with "stdlib.h" to be more consistent. At the same time I changed the order of the surrounding includes to reflect alphabetical order, because at some files this already have been the case.
2019-02-02Incorporate improved Windows fragility workaround from qtestJay Berkenbilt
2019-01-27Example of form XObject, page overlayJay Berkenbilt
2019-01-07Work around test fragility on WindowsJay Berkenbilt
2018-12-23Add comment about json to pdf-bookmarksJay Berkenbilt
2018-12-22Rewrite bookmark example to use outline helpersJay Berkenbilt
Now uses QPDFOutlineDocumentHelper and QPDFOutlineObjectHelper.
2018-08-13Catch exceptions as const references (fixes #236)Jay Berkenbilt
This fix allows qpdf to compile/test cleanly with gcc 8.