2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-09-20 17:19:08 +00:00
qpdf/qpdf/qtest/qpdf/page_api_2-json-objects.out
Jay Berkenbilt dc9b7287cd Top-level json: write incrementally
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-07 08:26:31 -04:00

161 lines
2.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"version": 1,
"parameters": {
"decodelevel": "generalized"
},
"objects": {
"1 0 R": {
"/Pages": "3 0 R",
"/Type": "/Catalog"
},
"10 0 R": 47,
"2 0 R": {
"/CreationDate": "D:20120621124041",
"/Producer": "Apex PDFWriter"
},
"3 0 R": {
"/Count": 3,
"/Kids": [
"4 0 R",
"4 0 R",
"5 0 R"
],
"/Type": "/Pages"
},
"4 0 R": {
"/Contents": "6 0 R",
"/MediaBox": [
0,
0,
612,
792
],
"/Parent": "3 0 R",
"/Resources": {
"/Font": {
"/F1": "8 0 R"
},
"/ProcSet": [
"/PDF",
"/Text"
]
},
"/Type": "/Page"
},
"5 0 R": {
"/Contents": "9 0 R",
"/MediaBox": [
0,
0,
612,
792
],
"/Parent": "3 0 R",
"/Resources": {
"/Font": {
"/F1": "8 0 R"
},
"/ProcSet": [
"/PDF",
"/Text"
]
},
"/Type": "/Page"
},
"6 0 R": {
"/Length": "7 0 R"
},
"7 0 R": 47,
"8 0 R": {
"/BaseFont": "/Times-Roman",
"/Encoding": "/WinAnsiEncoding",
"/Subtype": "/Type1",
"/Type": "/Font"
},
"9 0 R": {
"/Length": "10 0 R"
},
"trailer": {
"/ID": [
"û˘·ƒÿ{5\u0005ÚS*ºo",
"÷\u0017ž³QY¿ÔÀ\u000f\u0012¼ý˜\u0002"
],
"/Info": "2 0 R",
"/Root": "1 0 R",
"/Size": 11
}
},
"objectinfo": {
"1 0 R": {
"stream": {
"filter": null,
"is": false,
"length": null
}
},
"10 0 R": {
"stream": {
"filter": null,
"is": false,
"length": null
}
},
"2 0 R": {
"stream": {
"filter": null,
"is": false,
"length": null
}
},
"3 0 R": {
"stream": {
"filter": null,
"is": false,
"length": null
}
},
"4 0 R": {
"stream": {
"filter": null,
"is": false,
"length": null
}
},
"5 0 R": {
"stream": {
"filter": null,
"is": false,
"length": null
}
},
"6 0 R": {
"stream": {
"filter": null,
"is": true,
"length": 47
}
},
"7 0 R": {
"stream": {
"filter": null,
"is": false,
"length": null
}
},
"8 0 R": {
"stream": {
"filter": null,
"is": false,
"length": null
}
},
"9 0 R": {
"stream": {
"filter": null,
"is": true,
"length": 47
}
}
}
}