2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-11 15:40:58 +00:00
Commit Graph

1197 Commits

Author SHA1 Message Date
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
3dbbf9f240 TODO 2019-01-01 08:38:15 -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
104fd6da52 Add matrix and annotation appearance stream handling
Generate page content fragment for rendering appearance streams
including all matrix calculation.
2019-01-01 08:07:21 -05:00
Jay Berkenbilt
5059ec0d35 Add Matrix class under QPDFObjectHandle 2018-12-31 23:02:43 -05:00
Jay Berkenbilt
daeb5a85b6 Transformation matrix 2018-12-31 18:23:47 -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
2e2223ffe1 TODO 2018-12-23 11:54:10 -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
2e306d3249 Add comment about json to pdf-bookmarks 2018-12-23 09:15:46 -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
6b90f3db4d Document new and missing command-line options 2018-12-23 09:15:40 -05:00
Jay Berkenbilt
24aeb9ae22 Document json support 2018-12-22 14:05:01 -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
4fbffdf8ed Rewrite bookmark example to use outline helpers
Now uses QPDFOutlineDocumentHelper and QPDFOutlineObjectHelper.
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
30a0c070e4 Add QPDFObjectHandle::getJSON() 2018-12-21 18:34:56 -05:00
Jay Berkenbilt
651179b5da Add simple JSON serializer 2018-12-21 18:34:56 -05:00
Jay Berkenbilt
0776c00129 Add QPDFNameTreeObjectHelper 2018-12-21 18:34:56 -05:00
Jay Berkenbilt
d2f3975948 Add missing virtual destructors to all helper classes 2018-12-21 18:34:56 -05:00
Jay Berkenbilt
cc500eda91 Minor cleanup 2018-12-21 17:25:31 -05:00
Jay Berkenbilt
a4de20cd3f Azure pipelines: use make -k 2018-12-21 17:25:31 -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
077d3d4512 Add QPDFObjectHandle::wrapInArray()
Wrap an object in an array if it is not already an array.
2018-12-18 16:45:48 -05:00
Jay Berkenbilt
9caf005d89 Fix typo in header file 2018-12-18 16:27:36 -05:00
Jay Berkenbilt
3e6d698527 Update aclocal.m4 2018-12-18 16:27:36 -05:00
Jay Berkenbilt
27be64f4ba README-maintaner: sanitize undefined as well as adddress
gcc already warns for undefined variables, but this is in preparation
for Google's oss-fuzz, which builds in this way.
2018-12-18 16:27:22 -05:00