Jay Berkenbilt
8d229e078f
Improve info message in optimize images ( fixes #280 )
...
When qpdf can't optimize an image because of an unsupported color
space, state this specifically. Recognize that many valid colorspaces
are not represented as name objects.
2019-01-29 18:16:02 -05:00
Jay Berkenbilt
426434c772
Add --overlay and --underlay to qpdf CLI ( fixes #207 )
2019-01-27 09:30:13 -05:00
Jay Berkenbilt
009767d97a
Handle inheritable page attributes
...
Add getAttribute for handling inheritable page attributes, and fix
getPageImages and annotation flattening code to use it.
2019-01-25 22:30:05 -05:00
Jay Berkenbilt
c2030d1f33
Implement password recovery suppression and password mode ( fixes #215 )
...
Allow fine control over how passwords are encoded for writing, and
allow password for reading to be given as a hexademical encoded
string. Allow suppression of password recovery as a means to ensure
that the password you specify is actually the right one.
2019-01-19 10:14:07 -05:00
Jay Berkenbilt
392f2ece51
Try passwords with different string encodings
2019-01-19 10:10:58 -05:00
Jay Berkenbilt
e4fa5a3c2a
Refactor qpdf processing
...
Push calls to processFile and processInputSource into separate
functions in preparation for password recovery changes
2019-01-19 10:10:58 -05:00
Jay Berkenbilt
966429e718
Update CLI and manual for new encryption granularity ( fixes #214 )
2019-01-17 11:43:56 -05:00
Jay Berkenbilt
6ec22f117d
Modernize encryption API for more granularity
...
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.
2019-01-17 11:43:56 -05:00
Jay Berkenbilt
429ffcf397
Unicode main for Windows qpdf.cc
2019-01-17 11:43:56 -05:00
Jay Berkenbilt
654c0e8caf
Allow adding the same page more than once in --pages ( fixes #272 )
2019-01-12 10:01:47 -05:00
Jay Berkenbilt
53d8e916b7
Interpret . in --pages as a shortcut for the primary file
2019-01-12 09:59:03 -05:00
Jay Berkenbilt
3472f6c984
Update copyrights for 2019
2019-01-07 07:54:55 -05:00
Jay Berkenbilt
8a5ca0e406
Don't keep QPDF objects for merging longer than needed
2019-01-07 07:38:03 -05:00
Jay Berkenbilt
a70fbaaf50
Honor other base encodings when generating appearances
2019-01-05 23:01:59 -05:00
Jay Berkenbilt
5c682f6d1e
Fix image optimization evaluation
...
Don't attempt to pass data through a JPEG filter if we are unable to
filter the data.
2019-01-05 22:37:49 -05:00
Jay Berkenbilt
ee437705fc
Update documentation for new features
2019-01-04 21:58:22 -05:00
Jay Berkenbilt
ab9f4cc212
Split help string
...
It was too long for some compilers.
2019-01-04 21:33:14 -05:00
Jay Berkenbilt
2e342ee5bb
Spell check
2019-01-04 21:33:14 -05:00
Jay Berkenbilt
ee2aad4381
Add CLI flags for image optimization
2019-01-04 21:33:14 -05:00
Jay Berkenbilt
7b6ab900dc
Support page collation with --collate ( fixes #259 )
2019-01-04 15:13:02 -05:00
Jay Berkenbilt
158156d506
Add basic appearance stream generation
2019-01-04 08:00:19 -05:00
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
ca94ac68d9
Honor flags when flattening annotations
2019-01-03 11:59:55 -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
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
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
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
352ce9b22b
Preserve page labels (numbers) when splitting and merging
2018-12-18 16:59:24 -05:00
Jay Berkenbilt
28453a4908
Add --keep-files-open flag ( fixes #237 )
2018-08-18 10:56:01 -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
fe769f2723
Keep file open while adding its pages during merge ( fixes #217 )
2018-08-04 19:58:13 -04:00
Jay Berkenbilt
6bf47ac6e8
With --verbose, give information on processing merge inputs
2018-06-22 16:14:54 -04:00