aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFJob.cc
AgeCommit message (Collapse)Author
2022-09-09Make QPDFLogger() private and provide create methodJay Berkenbilt
2022-09-07Revert getOwningQPDF, and add getQPDF that returns a referenceJay Berkenbilt
2022-09-06Support --show-encryption without a valid password (fixes #598)Jay Berkenbilt
2022-09-02Disallow --empty with --replace-input (fixes #728)Jay Berkenbilt
2022-09-02Disable copying/assigning to QPDF objects, add QPDF::create()Jay Berkenbilt
2022-08-31Add --report-mem-usage option for debugging/testingJay Berkenbilt
2022-08-28Add optional parameter allow_nullptr to QPDFObjectHandle::getOwningQPDFm-holger
Also, inline method and add optional parameter error_msg.
2022-08-07Code tidy: remove redundant calls to smart_ptrs get() methodm-holger
2022-07-31Simplify --json-outputJay Berkenbilt
Now --json-output just changes defaults. Allow output file with --json.
2022-07-31Fix --json-help to take a version parameterJay Berkenbilt
2022-07-31Change the output of --json to use "qpdf" instead of "objects"Jay Berkenbilt
2022-07-31Change --json-output formatJay Berkenbilt
from "qpdf-v2" to "qpdf": [..., ...]
2022-07-31Update docs and prepare QPDF::writeJSON for changesJay Berkenbilt
Add additional parameters that will be needed to call QPDF::writeJSON in partial mode.
2022-07-31Fix/clarify meaning of depth parameter to json write methodsJay Berkenbilt
2022-07-31Merge pull request #734 from m-holger/nullptrJay Berkenbilt
Code tidy : replace 0 with nullptr or true
2022-07-26Code tidy : replace 0 with nullptr or truem-holger
2022-07-24Tweak "AndGet" mutator functions againJay Berkenbilt
Remove any ambiguity around whether old or new value is being returned.
2022-07-24Overload StreamDataProvider::provideStreamDatam-holger
Use 'QPDFObjGen const&' instead of 'int, int' in signature.
2022-07-24QPDFObjGen : tidy QPDFJobm-holger
Use QPDFObjGen::unparse where appropriate.
2022-07-24Add optional parameter separator to QPDFObjGen::unparsem-holger
Also, revert inlining of unparse and operator << from commit 4c6640c in order to avoid exposing QUtil.
2022-06-25Reformat codeJay Berkenbilt
2022-06-25Code tidy: QPDFJob::doJSONPageLabelsm-holger
Remove redundant variables pages and next.
2022-06-19Add QPDFJob::registerProgressReporterJay Berkenbilt
2022-06-19Add C API to QPDFLoggerJay Berkenbilt
2022-06-19Add more flexible funtions to qpdfjob C APIJay Berkenbilt
2022-06-18Use "save" logger when saving data to standard outputJay Berkenbilt
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.
2022-06-18QPDF, QPDFJob: use QPDFLogger instead of custom output streamsJay Berkenbilt
2022-05-31In json mode, reveal recovered user password when otherwise unavailableJay Berkenbilt
2022-05-31Add additional information when listing attachmentsJay Berkenbilt
2022-05-21Code clean up: use range-style for loops wherever possiblem-holger
Remove variables obsoleted by commit 4f24617.
2022-05-20Major rework -- see long commentsJay Berkenbilt
* 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.
2022-05-16Add --create-from-json and --update-from-json argumentsJay Berkenbilt
Also add stubs for top-level QPDF methods (createFromJSON, updateFromJSON)
2022-05-08Add maxobjectid to JSONJay Berkenbilt
2022-05-08Implement JSON v2 outputJay Berkenbilt
2022-05-08Fix typo in json output key nameJay Berkenbilt
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.
2022-05-07Prepare code for JSON v2Jay Berkenbilt
Update getJSON() methods and calls to them
2022-05-07Objectinfo json: write incrementally and in numeric orderJay Berkenbilt
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)) ----------
2022-05-07Objects json: write incrementally and in numeric orderJay Berkenbilt
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)) ----------
2022-05-07Pages json: write each page incrementallyJay Berkenbilt
2022-05-07Top-level json: write incrementallyJay Berkenbilt
This commit just changes the order in which fields are written to the json without changing their content. All the json files in the test suite were modified with this script to ensure that we didn't get any changes other than ordering. ---------- #!/usr/bin/env python3 import json import sys 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()) newdata = {} for i in ('version', 'parameters', 'pages', 'pagelabels', 'acroform', 'attachments', 'encrypt', 'outlines', 'objects', 'objectinfo'): if i in data: newdata[i] = data[i] print(json_dumps(newdata)) ----------
2022-05-07Test json against schema only on demandJay Berkenbilt
Testing json against schema requires an in-memory copy, so do it only when requested by the test suite.
2022-05-07Add --test-json-schema command-line optionJay Berkenbilt
2022-05-07QPDFJob: have doJSON write to a pipelineJay Berkenbilt
2022-05-04Add new FileInputSource constructorsJay Berkenbilt
2022-05-04Make "objects" and "pages" consistent in JSON outputJay Berkenbilt
2022-05-04Don't call pushInheritedAttributesToPage in json modeJay Berkenbilt
We used to have to do that, but for quite some time, the code that gets images has no longer required it.
2022-05-01Spell checkJay Berkenbilt
2022-04-30Mark weak encryption with API changes (fixes #576)Jay Berkenbilt
2022-04-30Using insecure crytpo from the CLI is now an error by defaultJay Berkenbilt
2022-04-30Code clean up: use range-style for loops wherever possibleJay Berkenbilt
Where not possible, use "auto" to get the iterator type. Editorial note: I have avoid this change for a long time because of not wanting to make gratuitous changes to version history, which can obscure when certain changes were made, but with having recently touched every single file to apply automatic code formatting and with making several broad changes to the API, I decided it was time to take the plunge and get rid of the older (pre-C++11) verbose iterator syntax. The new code is just easier to read and understand, and in many cases, it will be more effecient as fewer temporary copies are being made. m-holger, if you're reading, you can see that I've finally come around. :-)