aboutsummaryrefslogtreecommitdiffstats
path: root/examples
AgeCommit message (Collapse)Author
2022-04-05Update some code manually to get better formatting resultsJay Berkenbilt
Add comments to force line breaks, parenthesize function arguments that are contatenated strings, etc. -- these kinds of changes improve clang-format's results and also cause emacs cc-mode to match clang-format. After this type of change, most of the time, when clang-format and emacs disagree, clang-format is better.
2022-04-04Programmatically apply new formatting to codeJay Berkenbilt
Run this: for i in **/*.cc **/*.c **/*.h **/*.hh; do clang-format < $i >| $i.new && mv $i.new $i done
2022-03-19Remove "lt-" workaroundsJay Berkenbilt
The executables that libtool built invoked the underlying binary with an "lt-" prefix. The code contained numerous workarounds for testing, which can now be removed.
2022-03-19Remove old build filesJay Berkenbilt
2022-03-19Add cmake configuration filesJay Berkenbilt
2022-03-19Run qpdf from path rather than environment variable in testsJay Berkenbilt
With cmake, we are customizing the path for each test suite so we can ensure we get the right qpdf without having to use an environment variable.
2022-03-03Tidy example pdf-double-page-sizem-holger
Also fix typo in pdf-attach-file example.
2022-02-26Tidy pdf-create examplem-holger
Convert loop to use range-based for statement. Remove unnecessary variables.
2022-02-26Tidy pdf-count-strings examplem-holger
Convert loop to use range-based for statement. Remove unnecessary variables.
2022-02-25Tidy pdf-attach-file examplem-holger
2022-02-11Tidy pdf-bookmarks examplem-holger
Convert loops to use range-based for statements. Simplify the extract_bookmarks function.
2022-02-08WHITESPACE ONLY -- expand tabs in source codeJay Berkenbilt
This comment expands all tabs using an 8-character tab-width. You should ignore this commit when using git blame or use git blame -w. In the early days, I used to use tabs where possible for indentation, since emacs did this automatically. In recent years, I have switched to only using spaces, which means qpdf source code has been a mixture of spaces and tabs. I have avoided cleaning this up because of not wanting gratuitous whitespaces change to cloud the output of git blame, but I changed my mind after discussing with users who view qpdf source code in editors/IDEs that have other tab widths by default and in light of the fact that I am planning to start applying automatic code formatting soon.
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