aboutsummaryrefslogtreecommitdiffstats
path: root/examples
AgeCommit message (Collapse)Author
2022-09-08Switch user-supplied functions in C API to return intJay Berkenbilt
2022-07-26Code tidy : replace 0 with nullptr or truem-holger
2022-07-24Overload StreamDataProvider::provideStreamDatam-holger
Use 'QPDFObjGen const&' instead of 'int, int' in signature.
2022-06-25Reformat codeJay Berkenbilt
2022-06-19Add examples for output capture (fixes #691)Jay Berkenbilt
2022-05-21Code clean up: use range-style for loops wherever possiblem-holger
Remove variables obsoleted by commit 4f24617.
2022-05-20Back out fluent QPDFObjectHandle methods. Keep the andGet methods.Jay Berkenbilt
I decided these were confusing and inconsistent with how JSON works. They muddle the API rather than improving it.
2022-05-04Make use of the new Pipeline methods in some placesJay Berkenbilt
2022-05-04Make Pipeline::write take an unsigned char const* (API change)Jay Berkenbilt
2022-04-30Code clean up: use range-style for loops wherever possibleJay Berkenbilt
Where not possible, use "auto" to get the iterator type. Editorial note: I have avoid this change for a long time because of not wanting to make gratuitous changes to version history, which can obscure when certain changes were made, but with having recently touched every single file to apply automatic code formatting and with making several broad changes to the API, I decided it was time to take the plunge and get rid of the older (pre-C++11) verbose iterator syntax. The new code is just easier to read and understand, and in many cases, it will be more effecient as fewer temporary copies are being made. m-holger, if you're reading, you can see that I've finally come around. :-)
2022-04-30Formatting: remove space in range-style for loopsJay Berkenbilt
Change .clang-format and commit automated changes from a fresh run of format-code
2022-04-30Use fluent replaceKeyJay Berkenbilt
2022-04-16Use = default and = delete where possible in classesJay Berkenbilt
2022-04-09Replace PointerHolder with std::shared_ptr in the rest of the codeJay Berkenbilt
Increase to POINTERHOLDER_TRANSITION=3 patrepl s/PointerHolder/std::shared_ptr/g **/*.cc **/*.hh patrepl s/make_pointer_holder/std::make_shared/g **/*.cc patrepl s/make_array_pointer_holder/QUtil::make_shared_array/g **/*.cc patrepl s,qpdf/std::shared_ptr,qpdf/PointerHolder, **/*.cc **/*.hh git restore include/qpdf/PointerHolder.hh git restore libtests/pointer_holder.cc cleanpatch ./format-code
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