aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf/qpdf-ctest.c
AgeCommit message (Collapse)Author
2023-12-20Remove compression from linearization tests where possibleJay Berkenbilt
By combining --linearize with --compress-streams=n, we ensure that no new compressed data will appear in linearized output, which makes the output independent of zlib's output. There are other tests to ensure that linearization works correctly with compression. This commit involves changing some test outputs and test code as well just updating test suites.
2023-05-21Rerun clang-formatJay Berkenbilt
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-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-09Add JSON v2 support to C APIJay Berkenbilt
2022-05-04Make assert handling less error-proneJay Berkenbilt
Prevent my future self or other contributors from using assert in tests and then having that assert not do anything because of the NDEBUG macro.
2022-04-30Mark weak encryption with API changes (fixes #576)Jay Berkenbilt
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-07Force assert to be defined in test codeJay Berkenbilt
2022-03-01Tweak include of config for ctestJay Berkenbilt
2022-02-11Remove abs calls and pick correct floating point epsilon values (fixes #641)Jay Berkenbilt
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-06C-API expose QPDFObjectHandle::getKeyIfDictm-holger
2022-02-06C-API expose QPDFObjectHandle::getValueAs... accessorsm-holger
2022-02-05Add qpdf_empty_pdf to C APIJay Berkenbilt
2022-02-04C-API add two binary UTF8 funtionsm-holger
add qpdf_oh_new_binary_unicode_string and qpdf_oh_get_binary_utf8_value
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
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-18Fix LGTM alertsJay 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-16Output C test n done at the end of each qpdf-ctestJay Berkenbilt
2021-12-16C API: add functions for working with pages (fixes #594)Jay Berkenbilt
2021-12-16qpdf-ctest: outfile2 -> xargJay Berkenbilt
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-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-09Split qpdf-ctest test 24 into multiple testsJay Berkenbilt
Thanks for the nudge from m-holger!
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-19Add additional testing around improved array wrappingJay 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-02-13QUtil::double_to_string: trim trailing zeroes with option to disableJay Berkenbilt
2020-11-29Add QPDFObjectHandle manipulation to C APIJay Berkenbilt
2020-10-16Fix printf formatting for newer msvcJay Berkenbilt
Use autoconf rather than ifdefs to determine what format string to use for long long.
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-01-17Modernize encryption API for more granularityJay Berkenbilt
Setting encryption permissions for R >= 3 set permission bits in groups corresponding to menu options in Acrobat 5. The new API allows the bits to be set individually.
2018-02-19Add C API for checking PDF filesJay Berkenbilt
2017-09-12Update C API with new QPDFWriter methodsJay Berkenbilt
2017-08-27Missing free in some test codeJay Berkenbilt
There was a missing free causing a memory leak in some test code. The memory leak was not in library code.
2015-10-31Implement deterministic IDJay Berkenbilt
For non-encrypted files, determinstic ID generation uses file contents instead of timestamp and file name. At a small runtime cost, this enables generation of the same /ID if the same inputs are converted in the same way multiple times.
2013-03-05Fix long long format string for WIN32Jay Berkenbilt
2013-03-05Fix inadvertent pointer to integer castJay Berkenbilt
2013-03-05Favor strerror_s and fopen_s on MSVCJay Berkenbilt
Make remaining calls to fopen and strerror use strerror_s and fopen_s on MSVC.
2013-03-05Call QUtil::safe_fopen in place of fopenJay Berkenbilt
fopen was previuosly called wrapped by QUtil::fopen_wrapper, but QUtil::safe_fopen does this itself, which is less cumbersome.