Jay Berkenbilt
e3144ac417
Add form fields to json output
...
Also add some additional methods for detecting form field types to
assist in the json creation and for later use.
2019-01-03 23:18:13 -05:00
Jay Berkenbilt
26393f5137
New test file with form field types
2019-01-03 23:18:13 -05:00
Jay Berkenbilt
87f855dbfc
Rename test file
2019-01-03 23:18:13 -05:00
Jay Berkenbilt
ca94ac68d9
Honor flags when flattening annotations
2019-01-03 11:59:55 -05:00
Jay Berkenbilt
3e74916c5a
Fix seg fault on empty xref stream ( fixes #263 )
...
Thanks to @p-cher for supplying a patch.
2019-01-03 09:17:43 -05:00
Jay Berkenbilt
f78ea057ca
Switch annotation flattening to use the form xobjects
...
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-02 21:49:47 -05:00
Jay Berkenbilt
23bcfeb336
Remove bogus test cheating code
2019-01-02 21:49:47 -05:00
Jay Berkenbilt
3b8ce4f12a
Annotation flattening including form fields
...
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-01 08:14:15 -05:00
Jay Berkenbilt
95d6b17a89
Add QPDFObjectHandle::mergeDictionary()
2019-01-01 08:12:56 -05:00
Jay Berkenbilt
3440ea7d3c
JSON::serialize -> unparse
...
Unparse is admittedly strange, but I'd rather be strange and
consistent, and everything else in the qpdf library uses unparse to
serialize. (If you're reading this, the convention of using "unparse"
comes from the "clu" programming language.)
2018-12-25 11:52:21 -05:00
Jay Berkenbilt
6048c6e2f0
Don't crash on @file when file doesn't exist ( fixes #265 )
...
When @file is used and file doesn't exist, just treat it as a normal
argument.
2018-12-23 11:46:56 -05:00
Jay Berkenbilt
968e7e60b7
Add json tests
2018-12-23 11:21:59 -05:00
Jay Berkenbilt
64c1579544
Support zsh completion
2018-12-23 11:21:59 -05:00
Jay Berkenbilt
76bf863aaa
Add page position information to json
2018-12-23 09:15:40 -05:00
Jay Berkenbilt
52a0b767c8
Slightly improve bash completion arg parsing
2018-12-23 09:15:40 -05:00
Jay Berkenbilt
86f9b4c43b
Add colorspace and depth information in json for images
2018-12-22 11:42:38 -05:00
Jay Berkenbilt
62ea3b9197
Add outlines to json at document level
2018-12-22 11:42:38 -05:00
Jay Berkenbilt
ae9455bf44
Implement --json-objects
2018-12-22 11:42:38 -05:00
Jay Berkenbilt
ce714ac9b8
Call cleanup between test sections
2018-12-22 11:42:38 -05:00
Jay Berkenbilt
fa3051d977
Implement --json-keys
2018-12-22 11:42:38 -05:00
Jay Berkenbilt
2008d037b3
Handle help args using option tables; add json help
2018-12-22 11:42:38 -05:00
Jay Berkenbilt
b3da5a2cba
Switch json args and structure
2018-12-22 11:42:38 -05:00
Jay Berkenbilt
7985c77326
Completion: ignore characters at and after point
2018-12-22 11:42:37 -05:00
Jay Berkenbilt
bb89382f93
Allow --show-object=trailer
2018-12-21 19:11:57 -05:00
Jay Berkenbilt
dd1aca552c
Support bash completion using complete -C
2018-12-21 19:11:57 -05:00
Jay Berkenbilt
3c075fc017
Table-driven parsing of encrypt options
2018-12-21 19:11:57 -05:00
Jay Berkenbilt
245723c570
Table-driven parsing for top-level arguments
2018-12-21 19:11:57 -05:00
Jay Berkenbilt
151206603b
Move argument parsing into a class
2018-12-21 19:11:57 -05:00
Jay Berkenbilt
6580ffe983
Preliminary implementation of json mode
...
The json mode implemented in this commit is not the final version, or
are the command line arguments used to invoke it.
2018-12-21 19:11:57 -05:00
Jay Berkenbilt
fa3664357b
Move numrange code from qpdf.cc to QUtil.cc
...
Also move tests to libtests.
2018-12-21 19:11:57 -05:00
Jay Berkenbilt
313ba08126
Preserve some outline functionality in page splitting
2018-12-21 19:11:57 -05:00
Jay Berkenbilt
d5d179f441
Add document and object helpers for outlines (bookmarks)
2018-12-21 19:11:57 -05:00
Jay Berkenbilt
0776c00129
Add QPDFNameTreeObjectHelper
2018-12-21 18:34:56 -05:00
Jay Berkenbilt
352ce9b22b
Preserve page labels (numbers) when splitting and merging
2018-12-18 16:59:24 -05:00
Jay Berkenbilt
6ef9e31233
Add QPDFPageLabelDocumentHelper
2018-12-18 16:59:24 -05:00
Jay Berkenbilt
f38df27aa3
Add QPDFNumberTreeObjectHelper
2018-12-18 16:46:10 -05:00
Jay Berkenbilt
88fb2e5258
Workaround for fragile test on Windows
2018-10-16 11:41:00 -04:00
Jay Berkenbilt
28453a4908
Add --keep-files-open flag ( fixes #237 )
2018-08-18 10:56:01 -04:00
Jay Berkenbilt
7214ba2303
Fix memory error on virus workaround code
2018-08-14 16:41:13 -04:00
Jay Berkenbilt
164cbdde46
Protect against virus warnings ( fixes #216 )
...
Some files in the test suite trigger antivirus warnings. These are
not infected files with malicious intent. They are test files to
ensure that qpdf does not crash when it encounters the files. This
change enables those files to be obfuscated in the source repository
so that checking out qpdf from version control or extracting the
source code doesn't trigger antivirus warnings.
2018-08-13 19:26:20 -04:00
Jay Berkenbilt
fb1e29476c
Add --no-warn option to suppress warnings ( fixes #232 )
2018-08-12 22:20:40 -04:00
Jay Berkenbilt
a2f62935b3
Catch exceptions as const references ( fixes #236 )
...
This fix allows qpdf to compile/test cleanly with gcc 8.
2018-08-12 21:57:52 -04:00
Jay Berkenbilt
4a4736c695
Fix EOL handling inside strings ( fixes #226 )
...
CR, CRLF, and LF are all supposed to be treated as LF; only one EOL is
to be ignored after backslash.
2018-08-05 20:48:35 -04:00
Jay Berkenbilt
e1cd5891af
Fix infinite loop on small files with progress reporting ( fixes #230 )
...
Turns out you can keep adding zero to a number over and over again and
it just doesn't get any bigger. Who would have known?
2018-08-05 15:43:34 -04:00
Jay Berkenbilt
fe769f2723
Keep file open while adding its pages during merge ( fixes #217 )
2018-08-04 19:58:13 -04:00
Jay Berkenbilt
3aad28aed0
Bug fix: honor encryption key length with R=3 ( fixes #212 )
2018-06-22 19:24:26 -04:00
Jay Berkenbilt
c852af2a57
Add tests for progress and verbose changes
2018-06-22 16:14:54 -04:00
Jay Berkenbilt
6bf47ac6e8
With --verbose, give information on processing merge inputs
2018-06-22 16:14:54 -04:00
Jay Berkenbilt
a433ed24f9
Add progress reporting for QPDFWriter ( fixes #200 )
2018-06-22 16:14:54 -04:00
Jay Berkenbilt
99593e0eef
Use ClosedFileInputSource when merging files ( fixes #154 )
2018-06-22 12:53:41 -04:00