-
Also, inline method and add optional parameter error_msg.
-
Now --json-output just changes defaults. Allow output file with --json.
-
from "qpdf-v2" to "qpdf": [..., ...]
-
Add additional parameters that will be needed to call QPDF::writeJSON in partial mode.
-
Code tidy : replace 0 with nullptr or true
-
Remove any ambiguity around whether old or new value is being returned.
-
Use 'QPDFObjGen const&' instead of 'int, int' in signature.
-
Use QPDFObjGen::unparse where appropriate.
-
Also, revert inlining of unparse and operator << from commit 4c6640c in order to avoid exposing QUtil.
-
Remove redundant variables pages and next.
-
This includes the output PDF, streams from --show-object and attachments from --save-attachment. This also enables --verbose and --progress to work with saving to stdout.
-
Remove variables obsoleted by commit 4f24617.
-
* Replace --create-from-json=file with --json-input, which causes the regular input to be treated as json. * Eliminate --to-json * In --json=2, bring back "objects" and eliminate "objectinfo". Stream data is never present. * In --json-output=2, write "qpdf-v2" with "objects" and include stream data.
-
Also add stubs for top-level QPDF methods (createFromJSON, updateFromJSON)
-
moddify -> modify. Also carefully spell checked all remaining keys by splitting them into words and running a spell checker, not just relying on visual proofreading. That was the only one.
-
Update getJSON() methods and calls to them
-
This script was used on test data: ---------- #!/usr/bin/env python3 import json import sys import re def json_dumps(data): return json.dumps(data, ensure_ascii=False, indent=2, separators=(',', ': ')) for filename in sys.argv[1:]: with open(filename, 'r') as f: data = json.loads(f.read()) if 'objectinfo' not in data: continue trailer = None to_sort = [] for k, v in data['objectinfo'].items(): if k == 'trailer': trailer = v else: m = re.match(r'^(\d+) \d+ R', k) if m: to_sort.append([int(m.group(1)), k, v]) newobjectinfo = {x[1]: x[2] for x in sorted(to_sort)} if trailer is not None: newobjectinfo['trailer'] = trailer data['objectinfo'] = newobjectinfo print(json_dumps(data)) ---------- -
The following script was used to adjust test data: ---------- #!/usr/bin/env python3 import json import sys import re def json_dumps(data): return json.dumps(data, ensure_ascii=False, indent=2, separators=(',', ': ')) for filename in sys.argv[1:]: with open(filename, 'r') as f: data = json.loads(f.read()) if 'objects' not in data: continue trailer = None to_sort = [] for k, v in data['objects'].items(): if k == 'trailer': trailer = v else: m = re.match(r'^(\d+) \d+ R', k) if m: to_sort.append([int(m.group(1)), k, v]) newobjects = {x[1]: x[2] for x in sorted(to_sort)} if trailer is not None: newobjects['trailer'] = trailer data['objects'] = newobjects print(json_dumps(data)) ----------