Logo white

OpenSystemsDevelopment / qpdf

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • Commits 4,691
  • Compare
  • Branches 1
  • Tags 0
  • qpdf
20 May, 2022
18 commits
  • Test (and fix) handling of dangling references
    6d4e3ba8
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Bug fix: isReserved() true for indirect reference to reserved object
    5a2aa594
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Explicitly test ignoring unknown keys in JSON input
    35b1e1c4
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Make version default to latest for --json-output (like --json)
    dc8df962
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Round-trip tests with --json-stream-data=file
    907df2c8
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Tests with manually constructed qpdf json
    a83b7b06
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Add tests for --json-input
    7f8c4b18
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • JSON fix: correctly parse UTF-16 surrogate pairs
    6c7326b2
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Add more names and strings in good13 ...
    1ec561da
    * native UTF-8 strings
    * names whose PDF and canonical syntax differ in both dictionary key
      positions and other positions
    
    For json, names are converted both as names and directly when used as
    dictionary keys.
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Rename all test files: _ to -
    6c5e5906
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Major rework -- see long comments ...
    6f43bf8d
    * 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.
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Add QUtil::FileCloser to the public API
    23fc6756
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Support stream data -- not tested ...
    0fe8d447
    There are no automated tests yet, but committing work so far in
    preparation for some refactoring.
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • replaceStreamData: accept uninitialized filter/decode_parms ...
    63c7eefe
    These mean to leave the original values alone. This is needed for
    reconstructing streams from JSON given that the stream data and stream
    dictionary may appear in any order in the JSON.
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Back out fluent QPDFObjectHandle methods. Keep the andGet methods. ...
    56f1b411
    I decided these were confusing and inconsistent with how JSON works.
    They muddle the API rather than improving it.
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Parse objects; stream data is not yet handled
    7e7a9c43
    Jay Berkenbilt authored
    2022-05-20 09:16:25 -0400  
    Browse Code »
  • Add new error type for JSON
    be0ed6ab
    Jay Berkenbilt authored
    2022-05-20 07:54:09 -0400  
    Browse Code »
  • Add private methods for reserving specific objects
    9064542b
    Jay Berkenbilt authored
    2022-05-20 07:54:09 -0400  
    Browse Code »

16 May, 2022
7 commits
  • Implement top-level qpdf json parsing
    7fa5d177
    Jay Berkenbilt authored
    2022-05-16 13:41:40 -0400  
    Browse Code »
  • Add scaffolding for QPDF JSON reactor
    8d42eb26
    Jay Berkenbilt authored
    2022-05-16 13:41:40 -0400  
    Browse Code »
  • Add --create-from-json and --update-from-json arguments ...
    4fe2e06b
    Also add stubs for top-level QPDF methods (createFromJSON,
    updateFromJSON)
    Jay Berkenbilt authored
    2022-05-16 13:41:40 -0400  
    Browse Code »
  • TODO: solidify work for JSON to PDF
    ed613003
    Jay Berkenbilt authored
    2022-05-16 13:41:40 -0400  
    Browse Code »
  • Remove offset from missing /Root error ...
    9a0e9a1a
    The last offset is irrelevant to not being able to find /Root.
    Jay Berkenbilt authored
    2022-05-16 13:39:26 -0400  
    Browse Code »
  • Improve handling of replacing stream data with empty strings ...
    051ae7c2
    When an empty string was passed to replaceStreamData, the code was
    passing a null pointer to memcpy. Since a 0 size was also passed, this
    was harmless, but it triggers sanitizer errors. The code properly
    handles a null pointer as the buffer in other places.
    Jay Berkenbilt authored
    2022-05-16 13:39:26 -0400  
    Browse Code »
  • Add QUtil::is_long_long
    60ec94a7
    Jay Berkenbilt authored
    2022-05-16 13:39:26 -0400  
    Browse Code »

14 May, 2022
3 commits
  • Split qpdf.test into multiple test suites ...
    173b944e
    This makes it a lot easier to run parts of the test suite.
    Jay Berkenbilt authored
    2022-05-14 17:35:06 -0400  
    Browse Code »
  • Update qtest-driver to log invalid tests ...
    4b642caf
    This is taken from an unrelased change to qtest.
    Jay Berkenbilt authored
    2022-05-14 17:35:06 -0400  
    Browse Code »
  • JSON reactor: improve handling of nested containers ...
    4c7cfd5c
    Call the parent container's item method before calling the child
    item's start method so we can easily know the current nesting level
    when nested items are added.
    Jay Berkenbilt authored
    2022-05-14 17:35:06 -0400  
    Browse Code »

08 May, 2022
11 commits
  • Add maxobjectid to JSON
    2a2f7f1b
    Jay Berkenbilt authored
    2022-05-08 13:45:20 -0400  
    Browse Code »
  • TODO note about linux binary distribution runpath
    02e8ef6f
    Jay Berkenbilt authored
    2022-05-08 13:45:20 -0400  
    Browse Code »
  • Add --to-json option
    e9390aea
    Jay Berkenbilt authored
    2022-05-08 13:45:20 -0400  
    Browse Code »
  • Test inline stream data with different decode levels
    2e87d593
    Jay Berkenbilt authored
    2022-05-08 13:45:20 -0400  
    Browse Code »
  • Test json v2 with invalid stream data
    f08f3989
    Jay Berkenbilt authored
    2022-05-08 13:45:20 -0400  
    Browse Code »
  • Implement JSON v2 output
    c76536dd
    Jay Berkenbilt authored
    2022-05-08 13:45:20 -0400  
    Browse Code »
  • Apply script across future v2 test files ...
    bdfc4da5
    There is one unexpected pass in this commit. This script was applied
    to the files changed in this commit:
    
    ----------
    #!/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())
        data['version'] = 2
        objectinfo = {}
        if 'objectinfo' in data:
            objectinfo = data['objectinfo']
            del data['objectinfo']
        if 'objects' not in data:
            continue
        qpdf = {'jsonversion': 2, 'pdfversion': '1.3', 'objects': {}}
        for k, v in data['objects'].items():
            is_stream = objectinfo.get(k, {}).get('stream', {}).get('is', False)
            if k.endswith(' R'):
                k = 'obj:' + k
            if is_stream:
                v = {'stream': {'dict': v}}
            else:
                v = {'value': v}
            qpdf['objects'][k] = v
        data['qpdf'] = qpdf
        del data['objects']
    print(json_dumps(data))
    ----------
    Jay Berkenbilt authored
    2022-05-08 13:45:20 -0400  
    Browse Code »
  • Prepare test suite for json v2
    8d348974
    Jay Berkenbilt authored
    2022-05-08 13:45:20 -0400  
    Browse Code »
  • Fix typo in json output key name ...
    15272662
    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.
    Jay Berkenbilt authored
    2022-05-08 13:45:20 -0400  
    Browse Code »
  • Implement JSON v2 for Stream ...
    1bc8abfd
    Not fully exercised in this commit
    Jay Berkenbilt authored
    2022-05-08 13:45:20 -0400  
    Browse Code »
  • Implement JSON v2 for String ...
    3246923c
    Also refine the herustic for deciding whether to use hexadecimal
    notation for a string.
    Jay Berkenbilt authored
    2022-05-08 13:45:20 -0400  
    Browse Code »

07 May, 2022
1 commit
  • Prepare code for JSON v2 ...
    16f4f94c
    Update getJSON() methods and calls to them
    Jay Berkenbilt authored
    2022-05-07 11:12:01 -0400  
    Browse Code »