Jay Berkenbilt
8971443e46
QPDF::addPage*: handle duplicate pages more robustly
2021-04-05 10:58:10 -04:00
Jay Berkenbilt
cb6e53136f
QPDFAcroFormDocumentHelper: add missing analyze calls
2021-03-04 18:11:44 -05:00
Jay Berkenbilt
0b77f2cf26
Revert non-binary-compatible handleWarning change -- see TODO (ABI)
2021-03-04 15:59:46 -05:00
Jay Berkenbilt
9fb174b9e9
Major rework of handling form fields when copying pages ( fixes #509 )
2021-03-04 15:08:37 -05:00
Jay Berkenbilt
a2124f992c
Add QPDFMatrix::operator==
2021-03-04 15:08:36 -05:00
Jay Berkenbilt
c9c711a351
Add string to deprecation warning
2021-03-04 15:08:36 -05:00
Jay Berkenbilt
d7ffdfa994
Add optional conflict detection to mergeResources
...
Also improve behavior around direct vs. indirect resources.
2021-03-04 15:08:36 -05:00
Jay Berkenbilt
a15ec6967d
Enhancements to ParserCallbacks
2021-03-03 17:05:49 -05:00
Jay Berkenbilt
1bb209a9bf
Add QPDF::numWarnings
2021-03-03 17:05:49 -05:00
Jay Berkenbilt
fa2516df71
Fix behavior for finding /Q, /DA, and /DR for form fields
...
If not found in the field hierarchy, /Q and /DA are supposed to be
looked up in the document-level form dictionary. /DR is supposed to
only come from the document dictionary.
2021-03-03 17:05:19 -05:00
Jay Berkenbilt
a4d6589ff2
Have QPDFObjectHandle notice when replaceObject was called
...
This results in a performance penalty of 1% to 2% when replaceObject
and swapObjects are never called and a somewhat larger penalty if they
are called, but it's worth it to avoid very confusing behavior as
discussed in depth in qpdf#507.
2021-02-25 07:32:46 -05:00
Jay Berkenbilt
1886673d7e
Spell check
2021-02-23 10:38:05 -05:00
Jay Berkenbilt
be3a8c0e7a
Keep only referenced form fields in --pages
2021-02-23 08:26:21 -05:00
Jay Berkenbilt
1f35ec9988
Add methods for copying form fields
2021-02-22 18:42:06 -05:00
Jay Berkenbilt
8e8c0d8290
Add new placeFormXObject that takes a matrix reference
2021-02-22 18:42:06 -05:00
Jay Berkenbilt
61d41e2e88
Add copyAnnotations, use with overlay/underlay ( fixes #395 )
2021-02-22 18:42:06 -05:00
Jay Berkenbilt
7b3cbacf5d
Change from QPDF{Array,Dict}Items to aitems() and ditems()
2021-02-22 11:05:39 -05:00
Jay Berkenbilt
a9ae8cadc6
Add transformAnnotations and fix flattenRotations to use it
2021-02-21 17:13:09 -05:00
Jay Berkenbilt
a76decd2d5
Add QPDFObjGen::unparse
2021-02-21 16:21:52 -05:00
Jay Berkenbilt
aa848126cb
Comment about QPDFMatrix and QPDFObjectHandle::Matrix
2021-02-21 08:06:19 -05:00
Jay Berkenbilt
92fbc6fdf5
QPDFObjectHandle::copyStream
2021-02-21 06:36:30 -05:00
Jay Berkenbilt
60afe4142e
Refactor: separate copyStreamData from replaceForeignIndirectObjects
2021-02-21 06:36:30 -05:00
Jay Berkenbilt
901f1a788c
Enhance QPDFMatrix API
2021-02-21 06:36:30 -05:00
Jay Berkenbilt
71e8627285
Add const versions of QPDFMatrix::transform*
2021-02-19 18:35:19 -05:00
Jay Berkenbilt
de8929a41c
Add QPDFAcroFormDocumentHelper::addFormField
2021-02-18 12:25:48 -05:00
Jay Berkenbilt
5cec6b4c3d
Add QPDFPageObjectHelper::getMatrixForFormXObjectPlacement
2021-02-18 12:25:48 -05:00
Jay Berkenbilt
0765872295
Form field for non-widget just returns null
2021-02-18 10:25:07 -05:00
Jay Berkenbilt
0b1623d07d
Add QUtil::path_basename
2021-02-18 09:59:03 -05:00
Jay Berkenbilt
8873466a5d
Remove outdated comment from QPDFAnnotationObjectHelper.hh
2021-02-17 20:14:20 -05:00
Jay Berkenbilt
a773f4c71d
Add QPDFObjectHandle::parse for strings with context
2021-02-15 11:33:03 -05:00
Jay Berkenbilt
efbb21673c
Add functional versions of QPDFObjectHandle::replaceStreamData
...
Also fix a bug in checking consistency of length for stream data
providers. Length should not be checked or recorded if the provider
says it failed to generate the data.
2021-02-14 14:42:24 -05:00
Jay Berkenbilt
e2593e2efe
Move QPDFMatrix into the public API
2021-02-13 02:30:00 -05:00
Jay Berkenbilt
07f40bd254
QUtil::double_to_string: trim trailing zeroes with option to disable
2021-02-13 02:30:00 -05:00
Jay Berkenbilt
8fbc8579f2
Allow zone information to be omitted from timestamp strings
2021-02-11 14:26:55 -05:00
Jay Berkenbilt
2538d84413
Explicitly deprecate old name/number tree constructors
...
Use C++14 [[deprecated]] tag
2021-02-10 16:28:00 -05:00
Jay Berkenbilt
ad34b9c278
Implement helpers for file attachments
2021-02-10 06:57:37 -05:00
Jay Berkenbilt
bf0e6eb302
Add QUtil methods for dealing with PDF timestamp strings
2021-02-09 17:50:24 -05:00
Jay Berkenbilt
553ac7f353
Add QUtil::pipe_file and QUtil::file_provider
2021-02-07 19:41:34 -05:00
Jay Berkenbilt
e076c9bf08
Remove erroneous handling of /EFF for stream decryption
...
I thought /EFF was supposed to be used as a default for decrypting
embedded file streams, but actually it's supposed to be advice to a
conforming writer about handling new ones. This makes sense since the
findAttachmentStreams code, which is not actually needed, was never
right.
2021-02-06 17:08:41 -05:00
Jay Berkenbilt
faa2e3ddfd
Handle older PDFs whose form XObjects inherit resources ( fixes #494 )
...
When removing unreferenced resources, notice if a page (recursively)
contains a form XObject with unreferenced resources, and count any
such resources as referenced by the page.
2021-02-02 18:06:05 -05:00
Jay Berkenbilt
81025e4998
Refactor removal of unreferenced resources
...
Refactor in preparation for resolving unresolved resources in form
xobjects from page.
2021-02-02 18:06:05 -05:00
Jay Berkenbilt
4ae93a73c5
Improve memory safety of dict/array iterators
2021-01-31 07:16:03 -05:00
Jay Berkenbilt
1fec40454e
Add example of name/number trees and dictionary/array iteration
2021-01-30 15:52:16 -05:00
Jay Berkenbilt
de0b11fc47
Add C++ iterator API around array and dictionary objects
2021-01-30 15:15:23 -05:00
Jay Berkenbilt
50decc9bb8
name/number tree: explicitly declare default destructors
2021-01-29 15:46:54 -05:00
Jay Berkenbilt
8ed3e8c79b
NNTree: rework iterators to be more memory efficient
...
Keep a std::pair internal to the iterators so that operator* can
return a reference and operator-> can work, and each can work without
copying pairs of objects around.
2021-01-26 09:12:23 -05:00
Jay Berkenbilt
e7e20772ed
name/number trees: remove
2021-01-26 09:12:23 -05:00
Jay Berkenbilt
5816fb44b8
name/number trees: insertAfter
2021-01-25 15:39:10 -05:00
Jay Berkenbilt
16a9bb3f6f
name/number trees: newEmpty, increment/decrement end()
2021-01-25 15:39:10 -05:00
Jay Berkenbilt
b5614f611d
Implement repair and insert for name/number trees
2021-01-24 19:31:45 -05:00