aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFAnnotationObjectHelper.cc
AgeCommit message (Collapse)Author
2022-04-16Use = default and = delete where possible in classesJay 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-02-04Add a blank line after the first header included in each sourceJay Berkenbilt
2021-03-03Fix typos in coverage casesJay Berkenbilt
2019-09-20Fix typo in commentJay 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-01-27Move rectangle transformation into QPDFMatrixJay Berkenbilt
2019-01-04Add form fields to json outputJay Berkenbilt
Also add some additional methods for detecting form field types to assist in the json creation and for later use.
2019-01-03Honor flags when flattening annotationsJay Berkenbilt
2019-01-03Switch annotation flattening to use the form xobjectsJay Berkenbilt
Instead of directly putting the contents of the annotation appearance streams into the page's content stream, add commands to render the form xobjects directly. This is a more robust way to do it than the original solution as it works properly with patterns and avoids problems with resource name clashes between the pages and the form xobjects.
2019-01-01Annotation flattening including form fieldsJay Berkenbilt
Flatten annotations by integrating their appearance streams into the content stream of the containing page. In the case of form fields, only flatten if /NeedAppearance is false (or equivalently absent). If flattening form fields, also remove /AcroForm from the document catalog.
2019-01-01Add matrix and annotation appearance stream handlingJay Berkenbilt
Generate page content fragment for rendering appearance streams including all matrix calculation.
2018-06-21Implement helper class for interactive formsJay Berkenbilt