aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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-07Make JSON::writeNext publicJay 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 next to Pl_String and fix commentsJay Berkenbilt
2022-05-07Add --test-json-schema command-line optionJay Berkenbilt
2022-05-07QPDFJob: have doJSON write to a pipelineJay Berkenbilt
2022-05-07TODO: solidify remaining json v2 workJay Berkenbilt
2022-05-07JSON: add blob type that generates base64-encoded binary dataJay Berkenbilt
2022-05-04Change JSON parser to parse from an InputSourceJay Berkenbilt
2022-05-04Add new FileInputSource constructorsJay Berkenbilt
2022-05-04JSON: add write methods and implement unparse() in terms of thoseJay 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-04Add new Pl_String PipelineJay Berkenbilt
2022-05-04Add new Pl_OStream PipelineJay Berkenbilt
2022-05-04Make use of the new Pipeline methods in some placesJay Berkenbilt
2022-05-04Add new Pipeline convenience methodsJay Berkenbilt
2022-05-04Make Pipeline::write take an unsigned char const* (API change)Jay Berkenbilt
2022-05-04Spell check with newer cSpellJay Berkenbilt
2022-05-04Make assert handling less error-proneJay Berkenbilt
Prevent my future self or other contributors from using assert in tests and then having that assert not do anything because of the NDEBUG macro.
2022-05-04Remove remaining incorrect assert calls from implementationJay Berkenbilt
2022-05-04TODO note about test suitesJay Berkenbilt
2022-05-04Add internal Pl_Base64Jay Berkenbilt
Bidirectional base64; will be used by JSON v2.
2022-05-03Make sure building docs updates job.sums if neededJay Berkenbilt
2022-05-03Move generate_auto_job to the top-level CMakeLists.txtJay Berkenbilt
2022-05-03TODO: more JSON notesJay Berkenbilt
2022-05-03TODO: JSON notesJay Berkenbilt
2022-05-02Add reactors to the JSON parserJay Berkenbilt
2022-05-02Windows perl workaroundJay Berkenbilt
2022-05-01qtest: don't run coverage when TESTS is givenJay Berkenbilt
2022-05-01Limit parser depth for json parserJay Berkenbilt
2022-05-01Spell checkJay Berkenbilt
2022-05-01TODO itemJay Berkenbilt
2022-04-30Mark weak encryption with API changes (fixes #576)Jay Berkenbilt
2022-04-30Remove deprecated (pre-8.4.0) encryption APIsJay Berkenbilt
2022-04-30TODO: reminder to look for deprecated APIs in ABI sectionJay Berkenbilt
2022-04-30Using insecure crytpo from the CLI is now an error by defaultJay Berkenbilt
2022-04-30Add comments around non-security-related uses of MD5Jay Berkenbilt
2022-04-30Revert "Remove QPDFObjectHandle::replaceOrRemoveKey"Jay Berkenbilt
This reverts commit dc059560e73e0b373a6e54e71b07e3af4b692cb4. I changed my mind. There's no harm in leaving it deprecated for a release cycle.
2022-04-30Remove QPDFObjectHandle::replaceOrRemoveKeyJay Berkenbilt
See ChangeLog for rationale for not deprecating it as originally planned.
2022-04-30TODO: remove a few discarded API change ideasJay Berkenbilt
I had some ideas about some more convenience methods from discussions with some developers, but I decided that the newly added ones cover most of the use cases. The other ideas were too hard to explain clearly and therefore too specialized to put into the public API, where I would have to support them for a long time.
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. :-)
2022-04-30Formatting: remove space in range-style for loopsJay Berkenbilt
Change .clang-format and commit automated changes from a fresh run of format-code
2022-04-30Use fluent appendItemJay Berkenbilt
2022-04-30Use fluent replaceKeyJay Berkenbilt
2022-04-30Use replaceKeyAndGet in a few places in existing codeJay Berkenbilt