Commit c76536dd9a150adb71fdcda11ee1a93f25128cc7

Authored by Jay Berkenbilt
1 parent bdfc4da5

Implement JSON v2 output

Showing 40 changed files with 1183 additions and 1062 deletions
@@ -50,6 +50,8 @@ Output JSON v2 @@ -50,6 +50,8 @@ Output JSON v2
50 50
51 General things to remember: 51 General things to remember:
52 52
  53 +* Test inline and file stream data.
  54 +
53 * Make sure all the information from --check and other informational 55 * Make sure all the information from --check and other informational
54 options (--show-linearization, --show-encryption, --show-xref, 56 options (--show-linearization, --show-encryption, --show-xref,
55 --list-attachments, --show-npages) is available in the json output. 57 --list-attachments, --show-npages) is available in the json output.
@@ -58,9 +60,6 @@ General things to remember: @@ -58,9 +60,6 @@ General things to remember:
58 when present in the schema. It's reasonable for people to check for 60 when present in the schema. It's reasonable for people to check for
59 presence of a key. Most languages make this easy to do. 61 presence of a key. Most languages make this easy to do.
60 62
61 -* The choices for json_key (job.yml) will be different for v1 and v2.  
62 - That information is already duplicated in multiple places.  
63 -  
64 * Test stream with invalid data 63 * Test stream with invalid data
65 64
66 * When we get to full serialization, add json serialization 65 * When we get to full serialization, add json serialization
@@ -76,20 +75,61 @@ General things to remember: @@ -76,20 +75,61 @@ General things to remember:
76 * "b:cf80", "b:CF80", "u:π", "u:\u03c0" 75 * "b:cf80", "b:CF80", "u:π", "u:\u03c0"
77 * "b:d83edd54", "u:🥔", "u:\ud83e\udd54" 76 * "b:d83edd54", "u:🥔", "u:\ud83e\udd54"
78 77
  78 +JSON to PDF:
  79 +
79 When reading a JSON string, any string that doesn't follow the above rules 80 When reading a JSON string, any string that doesn't follow the above rules
80 is an error. Just use newUnicodeString on "u:" strings. For "b:" 81 is an error. Just use newUnicodeString on "u:" strings. For "b:"
81 strings, decode the bytes with hex_decode and use newString. 82 strings, decode the bytes with hex_decode and use newString.
82 83
  84 +For going back from JSON to PDF, we can have
  85 +QPDF::fromJSON(std::shared_ptr<InputSource> which will have logic
  86 +similar to copyForeignObject. Note that this InputSource is not going
  87 +to be this->file. We have to keep it separately.
  88 +
  89 +The backing input source is this memory block:
  90 +
  91 +```
  92 +%PDF-1.3
  93 +xref
  94 +0 1
  95 +0000000000 65535 f
  96 +trailer << /Size 1 >>
  97 +startxref
  98 +9
  99 +%%EOF
  100 +```
  101 +
  102 +* Ignore all keys except .qpdf.
  103 +* Verify that .qpdf.jsonVersion is 2
  104 +* Set this->m->pdf_version based on the .qpdf.pdfVersion key
  105 +* For each object in .qpdf.objects:
  106 + * Walk through the object detecting any indirect objects. For each
  107 + one that is not already known, reserve the object. We can also
  108 + validate but we should try to do the best we can with invalid JSON
  109 + so people can get good error messages.
  110 + * Construct a QPDFObjectHandle from the JSON
  111 + * If the object is the trailer, update the trailer
  112 + * Else if the object doesn't exist, reserve it
  113 + * If the object is reserved, call replaceReserved()
  114 + * Else the object already exists; this is an error.
  115 +
  116 +For streams, have a stream data provider that, for inline streams,
  117 +does a base64 from the file offsets and for file-based streams, reads
  118 +the file. For the inline case, we have to keep the json InputSource
  119 +around. Otherwise, we don't. It is an error if there is no stream data.
  120 +
  121 +Documentation:
  122 +
83 Serialized PDF: 123 Serialized PDF:
84 124
85 The JSON output will have a "qpdf" key containing 125 The JSON output will have a "qpdf" key containing
86 -* jsonVersion  
87 -* pdfVersion 126 +* jsonversion
  127 +* pdfversion
88 * objects 128 * objects
89 129
90 The "qpdf" key replaces "objects" and "objectinfo" in v1 JSON. 130 The "qpdf" key replaces "objects" and "objectinfo" in v1 JSON.
91 131
92 -Within .qpdf.objects, the key is "obj:o g R" or "obj:trailer", and the 132 +Within .qpdf.objects, the key is "obj:o g R" or "trailer", and the
93 value is a dictionary with exactly one of "value" or "stream" as its 133 value is a dictionary with exactly one of "value" or "stream" as its
94 single key. 134 single key.
95 135
@@ -113,16 +153,17 @@ For streams: @@ -113,16 +153,17 @@ For streams:
113 "stream": { 153 "stream": {
114 "dict": { ... stream dictionary ... }, 154 "dict": { ... stream dictionary ... },
115 "data": "base64-encoded data", 155 "data": "base64-encoded data",
116 - "dataFile": "path to base64-encoded data" 156 + "datafile": "path to base64-encoded data"
117 } 157 }
118 } 158 }
119 } 159 }
120 160
121 -At most one of "data" or "dataFile" will be present. When serializing, 161 +At most one of "data" or "datafile" will be present. When serializing,
122 stream decode parameters will be obeyed, and the stream dictionary 162 stream decode parameters will be obeyed, and the stream dictionary
123 will reflect the result. There will be the option to omit stream data. 163 will reflect the result. There will be the option to omit stream data.
124 164
125 -In the stream dictionary, "/Length" is always removed. 165 +When data is included, "/Length" is removed from the stream
  166 +dictionary.
126 167
127 Streams are filtered or not based on the --decode-level parameter. If 168 Streams are filtered or not based on the --decode-level parameter. If
128 a stream is filtered, "/Filter" and "/DecodeParms" are removed from 169 a stream is filtered, "/Filter" and "/DecodeParms" are removed from
@@ -131,74 +172,11 @@ for when the file is read back in. @@ -131,74 +172,11 @@ for when the file is read back in.
131 172
132 CLI: 173 CLI:
133 174
134 -* Add new flags  
135 -  
136 - * --from-json=input.json -- signals reading from a JSON and counts  
137 - as an input file.  
138 -  
139 - * --json-streams-omit -- stream data is omitted, the default  
140 -  
141 - * --json-streams-inline -- stream data is included in the "data"  
142 - key as base64-encoded  
143 -  
144 - * --json-streams-file-prefix=prefix -- stream is written to $prefix-$obj  
145 - where $obj is the object number. The path to the file is stored  
146 - in the "dataFile" key. A relative path is recommended and will be  
147 - interpreted as relative to the current directory. If a relative  
148 - prefix is given, a relative path will stored in "dataFile".  
149 - Example:  
150 - mkdir in-streams  
151 - qpdf in.pdf --json-streams-file-prefix=in-streams/ > out.json  
152 -  
153 - * --to-json -- changes default to --json-streams-inline implies  
154 - --json-key=qpdf  
155 -  
156 Example workflow: 175 Example workflow:
157 * qpdf in.pdf --to-json > pdf.json 176 * qpdf in.pdf --to-json > pdf.json
158 * edit pdf.json 177 * edit pdf.json
159 * qpdf --from-json=pdf.json out.pdf 178 * qpdf --from-json=pdf.json out.pdf
160 179
161 -JSON to PDF:  
162 -  
163 -For going back from JSON to PDF, we can have  
164 -QPDF::fromJSON(std::shared_ptr<InputSource> which will have logic  
165 -similar to copyForeignObject. Note that this InputSource is not going  
166 -to be this->file. We have to keep it separately.  
167 -  
168 -The backing input source is this memory block:  
169 -  
170 -```  
171 -%PDF-1.3  
172 -xref  
173 -0 1  
174 -0000000000 65535 f  
175 -trailer << /Size 1 >>  
176 -startxref  
177 -9  
178 -%%EOF  
179 -```  
180 -  
181 -* Ignore all keys except .qpdf.  
182 -* Verify that .qpdf.jsonVersion is 2  
183 -* Set this->m->pdf_version based on the .qpdf.pdfVersion key  
184 -* For each object in .qpdf.objects:  
185 - * Walk through the object detecting any indirect objects. For each  
186 - one that is not already known, reserve the object. We can also  
187 - validate but we should try to do the best we can with invalid JSON  
188 - so people can get good error messages.  
189 - * Construct a QPDFObjectHandle from the JSON  
190 - * If the object is the trailer, update the trailer  
191 - * Else if the object doesn't exist, reserve it  
192 - * If the object is reserved, call replaceReserved()  
193 - * Else the object already exists; this is an error.  
194 -  
195 -For streams, have a stream data provider that, for inline streams,  
196 -does a base64 from the file offsets and for file-based streams, reads  
197 -the file. For the inline case, we have to keep the json InputSource  
198 -around. Otherwise, we don't. It is an error if there is no stream data.  
199 -  
200 -Documentation:  
201 -  
202 Update --json option in cli.rst to mention v2 and update json.rst. 180 Update --json option in cli.rst to mention v2 and update json.rst.
203 181
204 Other documentation fodder: 182 Other documentation fodder:
include/qpdf/Constants.h
@@ -100,7 +100,7 @@ enum qpdf_stream_decode_level_e { @@ -100,7 +100,7 @@ enum qpdf_stream_decode_level_e {
100 qpdf_dl_all /* also decode lossy filters */ 100 qpdf_dl_all /* also decode lossy filters */
101 }; 101 };
102 /* For JSON encoding */ 102 /* For JSON encoding */
103 -enum qpdf_stream_data_json_e { 103 +enum qpdf_json_stream_data_e {
104 qpdf_sj_none = 0, 104 qpdf_sj_none = 0,
105 qpdf_sj_inline, 105 qpdf_sj_inline,
106 qpdf_sj_file, 106 qpdf_sj_file,
include/qpdf/QPDFJob.hh
@@ -515,12 +515,25 @@ class QPDFJob @@ -515,12 +515,25 @@ class QPDFJob
515 std::set<QPDFObjGen> getWantedJSONObjects(); 515 std::set<QPDFObjGen> getWantedJSONObjects();
516 void doJSONObjects(Pipeline* p, bool& first, QPDF& pdf); 516 void doJSONObjects(Pipeline* p, bool& first, QPDF& pdf);
517 void doJSONObjectinfo(Pipeline* p, bool& first, QPDF& pdf); 517 void doJSONObjectinfo(Pipeline* p, bool& first, QPDF& pdf);
  518 + void doJSONQpdf(Pipeline* p, bool& first, QPDF& pdf);
518 void doJSONPages(Pipeline* p, bool& first, QPDF& pdf); 519 void doJSONPages(Pipeline* p, bool& first, QPDF& pdf);
519 void doJSONPageLabels(Pipeline* p, bool& first, QPDF& pdf); 520 void doJSONPageLabels(Pipeline* p, bool& first, QPDF& pdf);
520 void doJSONOutlines(Pipeline* p, bool& first, QPDF& pdf); 521 void doJSONOutlines(Pipeline* p, bool& first, QPDF& pdf);
521 void doJSONAcroform(Pipeline* p, bool& first, QPDF& pdf); 522 void doJSONAcroform(Pipeline* p, bool& first, QPDF& pdf);
522 void doJSONEncrypt(Pipeline* p, bool& first, QPDF& pdf); 523 void doJSONEncrypt(Pipeline* p, bool& first, QPDF& pdf);
523 void doJSONAttachments(Pipeline* p, bool& first, QPDF& pdf); 524 void doJSONAttachments(Pipeline* p, bool& first, QPDF& pdf);
  525 + void doJSONStream(
  526 + Pipeline* p,
  527 + bool& first,
  528 + QPDF& pdf,
  529 + QPDFObjectHandle& obj,
  530 + std::string const& file_prefix);
  531 + void doJSONObject(
  532 + Pipeline* p,
  533 + bool& first,
  534 + QPDF& pdf,
  535 + std::string const& key,
  536 + QPDFObjectHandle& obj);
524 void addOutlinesToJson( 537 void addOutlinesToJson(
525 std::vector<QPDFOutlineObjectHelper> outlines, 538 std::vector<QPDFOutlineObjectHelper> outlines,
526 JSON& j, 539 JSON& j,
@@ -638,6 +651,8 @@ class QPDFJob @@ -638,6 +651,8 @@ class QPDFJob
638 int json_version; 651 int json_version;
639 std::set<std::string> json_keys; 652 std::set<std::string> json_keys;
640 std::set<std::string> json_objects; 653 std::set<std::string> json_objects;
  654 + qpdf_json_stream_data_e json_stream_data;
  655 + std::string json_stream_prefix;
641 bool test_json_schema; 656 bool test_json_schema;
642 bool check; 657 bool check;
643 bool optimize_images; 658 bool optimize_images;
include/qpdf/QPDFObjectHandle.hh
@@ -1377,12 +1377,16 @@ class QPDFObjectHandle @@ -1377,12 +1377,16 @@ class QPDFObjectHandle
1377 // data_filename argument must be supplied. The value of 1377 // data_filename argument must be supplied. The value of
1378 // data_filename is stored in the resulting json in the "datafile" 1378 // data_filename is stored in the resulting json in the "datafile"
1379 // key but is not otherwise use. The stream data itself (raw or 1379 // key but is not otherwise use. The stream data itself (raw or
1380 - // filtered depending on decode level), is written to the  
1381 - // pipeline via pipeStreamData(). 1380 + // filtered depending on decode level), is written to the pipeline
  1381 + // via pipeStreamData().
  1382 + //
  1383 + // NOTE: When json_data is qpdf_sj_inline, the QPDF object from
  1384 + // which the stream originates must remain valid until after the
  1385 + // JSON object is written.
1382 QPDF_DLL 1386 QPDF_DLL
1383 JSON getStreamJSON( 1387 JSON getStreamJSON(
1384 int json_version, 1388 int json_version,
1385 - qpdf_stream_data_json_e json_data, 1389 + qpdf_json_stream_data_e json_data,
1386 qpdf_stream_decode_level_e decode_level, 1390 qpdf_stream_decode_level_e decode_level,
1387 Pipeline* p, 1391 Pipeline* p,
1388 std::string const& data_filename); 1392 std::string const& data_filename);
include/qpdf/auto_job_c_main.hh
@@ -66,6 +66,7 @@ QPDF_DLL Config* removeAttachment(std::string const&amp; parameter); @@ -66,6 +66,7 @@ QPDF_DLL Config* removeAttachment(std::string const&amp; parameter);
66 QPDF_DLL Config* rotate(std::string const& parameter); 66 QPDF_DLL Config* rotate(std::string const& parameter);
67 QPDF_DLL Config* showAttachment(std::string const& parameter); 67 QPDF_DLL Config* showAttachment(std::string const& parameter);
68 QPDF_DLL Config* showObject(std::string const& parameter); 68 QPDF_DLL Config* showObject(std::string const& parameter);
  69 +QPDF_DLL Config* jsonStreamPrefix(std::string const& parameter);
69 QPDF_DLL Config* collate(std::string const& parameter); 70 QPDF_DLL Config* collate(std::string const& parameter);
70 QPDF_DLL Config* collate(); 71 QPDF_DLL Config* collate();
71 QPDF_DLL Config* splitPages(std::string const& parameter); 72 QPDF_DLL Config* splitPages(std::string const& parameter);
@@ -80,5 +81,6 @@ QPDF_DLL Config* objectStreams(std::string const&amp; parameter); @@ -80,5 +81,6 @@ QPDF_DLL Config* objectStreams(std::string const&amp; parameter);
80 QPDF_DLL Config* passwordMode(std::string const& parameter); 81 QPDF_DLL Config* passwordMode(std::string const& parameter);
81 QPDF_DLL Config* removeUnreferencedResources(std::string const& parameter); 82 QPDF_DLL Config* removeUnreferencedResources(std::string const& parameter);
82 QPDF_DLL Config* streamData(std::string const& parameter); 83 QPDF_DLL Config* streamData(std::string const& parameter);
  84 +QPDF_DLL Config* jsonStreamData(std::string const& parameter);
83 QPDF_DLL Config* json(std::string const& parameter); 85 QPDF_DLL Config* json(std::string const& parameter);
84 QPDF_DLL Config* json(); 86 QPDF_DLL Config* json();
job.sums
@@ -3,15 +3,15 @@ generate_auto_job 0514289f2deb3bf7c1a6e85ef7d99ad120321ef5a6fe49d76c5274c6a658d3 @@ -3,15 +3,15 @@ generate_auto_job 0514289f2deb3bf7c1a6e85ef7d99ad120321ef5a6fe49d76c5274c6a658d3
3 include/qpdf/auto_job_c_att.hh 4c2b171ea00531db54720bf49a43f8b34481586ae7fb6cbf225099ee42bc5bb4 3 include/qpdf/auto_job_c_att.hh 4c2b171ea00531db54720bf49a43f8b34481586ae7fb6cbf225099ee42bc5bb4
4 include/qpdf/auto_job_c_copy_att.hh 50609012bff14fd82f0649185940d617d05d530cdc522185c7f3920a561ccb42 4 include/qpdf/auto_job_c_copy_att.hh 50609012bff14fd82f0649185940d617d05d530cdc522185c7f3920a561ccb42
5 include/qpdf/auto_job_c_enc.hh 28446f3c32153a52afa239ea40503e6cc8ac2c026813526a349e0cd4ae17ddd5 5 include/qpdf/auto_job_c_enc.hh 28446f3c32153a52afa239ea40503e6cc8ac2c026813526a349e0cd4ae17ddd5
6 -include/qpdf/auto_job_c_main.hh 940aa6f1ead18ed08ba33f11254e9f042348262c85b91de742f0427094412a80 6 +include/qpdf/auto_job_c_main.hh 688959c4725a71e1340cccfb2cf780ec62ada5aa42a9c3c7c8a5cd8e85a4a17d
7 include/qpdf/auto_job_c_pages.hh b3cc0f21029f6d89efa043dcdbfa183cb59325b6506001c18911614fe8e568ec 7 include/qpdf/auto_job_c_pages.hh b3cc0f21029f6d89efa043dcdbfa183cb59325b6506001c18911614fe8e568ec
8 include/qpdf/auto_job_c_uo.hh ae21b69a1efa9333050f4833d465f6daff87e5b38e5106e49bbef5d4132e4ed1 8 include/qpdf/auto_job_c_uo.hh ae21b69a1efa9333050f4833d465f6daff87e5b38e5106e49bbef5d4132e4ed1
9 -job.yml e3d9752ea8810872447190b0b2b913f591ae03dfdd876945adf1bbb76942cd0f 9 +job.yml e73b8190f3e314bcdc98edf3d61d72283e5d0ff603b3d8ae98c77bb36b80028f
10 libqpdf/qpdf/auto_job_decl.hh 74df4d7fdbdf51ecd0d58ce1e9844bb5525b9adac5a45f7c9a787ecdda2868df 10 libqpdf/qpdf/auto_job_decl.hh 74df4d7fdbdf51ecd0d58ce1e9844bb5525b9adac5a45f7c9a787ecdda2868df
11 -libqpdf/qpdf/auto_job_help.hh a3d1a326a3f8ff61a7d451176acde3bb6c8ad66c1ea7a0b8c5d789917ad3a9ee  
12 -libqpdf/qpdf/auto_job_init.hh 1dcefadac02bb4b3a5d112912483902ad46489b1cacefefd3ebe4f64fc1b8a29 11 +libqpdf/qpdf/auto_job_help.hh feac25cd7e45fd587ca3c9b8807a1aed2e5510b592e76ae5bac775b0e03ac0b2
  12 +libqpdf/qpdf/auto_job_init.hh 7d98e1d4b213537b6d401a103a9d52c77aaea3e1164f06c3664625f6ebfa7e7d
13 libqpdf/qpdf/auto_job_json_decl.hh 06caa46eaf71db8a50c046f91866baa8087745a9474319fb7c86d92634cc8297 13 libqpdf/qpdf/auto_job_json_decl.hh 06caa46eaf71db8a50c046f91866baa8087745a9474319fb7c86d92634cc8297
14 -libqpdf/qpdf/auto_job_json_init.hh 784ff973e7efbf589f6a9b3ad22b3aada5c5393e9c5cd31845b8fe4af6e03f98  
15 -libqpdf/qpdf/auto_job_schema.hh cbbcae166cfecbdbdeb40c5a30870e03604a019a8b4f7a217d554a82431d2e5f 14 +libqpdf/qpdf/auto_job_json_init.hh 1c1dcefd9577638f04fa1b76c82ddb1d20d93017bb72782da2aca8a51d974770
  15 +libqpdf/qpdf/auto_job_schema.hh 748b2e11754c5186b31098ab1b7963306fe0d5fd91445df914c105c8fac49c18
16 manual/_ext/qpdf.py 6add6321666031d55ed4aedf7c00e5662bba856dfcd66ccb526563bffefbb580 16 manual/_ext/qpdf.py 6add6321666031d55ed4aedf7c00e5662bba856dfcd66ccb526563bffefbb580
17 -manual/cli.rst 8684ca1f601f2832cded52d1b2f74730f97b7b85b57e31a399231731fbe80d26 17 +manual/cli.rst 3901f7e099c2ebf29e81db7d93f3f19a92aff9e72ec6dfb0984a170cfcdd300f
@@ -47,11 +47,16 @@ choices: @@ -47,11 +47,16 @@ choices:
47 - acroform 47 - acroform
48 - attachments 48 - attachments
49 - encrypt 49 - encrypt
50 - - objectinfo  
51 - - objects 50 + - objectinfo # only v1
  51 + - objects # only v1
52 - outlines 52 - outlines
53 - pagelabels 53 - pagelabels
54 - pages 54 - pages
  55 + - qpdf # only v2
  56 + json_stream_data:
  57 + - none
  58 + - inline
  59 + - file
55 print128: 60 print128:
56 - full 61 - full
57 - low 62 - low
@@ -156,6 +161,7 @@ options: @@ -156,6 +161,7 @@ options:
156 rotate: "[+|-]angle" 161 rotate: "[+|-]angle"
157 show-attachment: attachment 162 show-attachment: attachment
158 show-object: trailer 163 show-object: trailer
  164 + json-stream-prefix: stream-file-prefix
159 required_choices: 165 required_choices:
160 compress-streams: yn 166 compress-streams: yn
161 decode-level: decode_level 167 decode-level: decode_level
@@ -167,6 +173,7 @@ options: @@ -167,6 +173,7 @@ options:
167 password-mode: password_mode 173 password-mode: password_mode
168 remove-unreferenced-resources: remove_unref 174 remove-unreferenced-resources: remove_unref
169 stream-data: stream_data 175 stream-data: stream_data
  176 + json-stream-data: json_stream_data
170 optional_choices: 177 optional_choices:
171 json: json_version 178 json: json_version
172 - table: pages 179 - table: pages
@@ -348,6 +355,8 @@ json: @@ -348,6 +355,8 @@ json:
348 - null 355 - null
349 json-object: 356 json-object:
350 - null 357 - null
  358 + json-stream-data:
  359 + json-stream-prefix:
351 # other options 360 # other options
352 allow-weak-crypto: 361 allow-weak-crypto:
353 keep-files-open: 362 keep-files-open:
libqpdf/QPDFJob.cc
@@ -401,6 +401,7 @@ QPDFJob::Members::Members() : @@ -401,6 +401,7 @@ QPDFJob::Members::Members() :
401 flatten_rotation(false), 401 flatten_rotation(false),
402 list_attachments(false), 402 list_attachments(false),
403 json_version(0), 403 json_version(0),
  404 + json_stream_data(qpdf_sj_none),
404 test_json_schema(false), 405 test_json_schema(false),
405 check(false), 406 check(false),
406 optimize_images(false), 407 optimize_images(false),
@@ -695,6 +696,17 @@ QPDFJob::checkConfiguration() @@ -695,6 +696,17 @@ QPDFJob::checkConfiguration()
695 " use --replace-input to intentionally" 696 " use --replace-input to intentionally"
696 " overwrite the input file"); 697 " overwrite the input file");
697 } 698 }
  699 +
  700 + if (m->json_version == 1) {
  701 + if (m->json_keys.count("qpdf")) {
  702 + usage("json key \"qpdf\" is not valid for json version 1");
  703 + }
  704 + } else {
  705 + if (m->json_keys.count("objects") || m->json_keys.count("objectinfo")) {
  706 + usage("json keys \"objects\" and \"objectinfo\" are only valid for "
  707 + "json version 1");
  708 + }
  709 + }
698 } 710 }
699 711
700 unsigned long 712 unsigned long
@@ -1104,6 +1116,102 @@ QPDFJob::doJSONObjectinfo(Pipeline* p, bool&amp; first, QPDF&amp; pdf) @@ -1104,6 +1116,102 @@ QPDFJob::doJSONObjectinfo(Pipeline* p, bool&amp; first, QPDF&amp; pdf)
1104 } 1116 }
1105 1117
1106 void 1118 void
  1119 +QPDFJob::doJSONStream(
  1120 + Pipeline* p,
  1121 + bool& first,
  1122 + QPDF& pdf,
  1123 + QPDFObjectHandle& obj,
  1124 + std::string const& file_prefix)
  1125 +{
  1126 + Pipeline* stream_p = nullptr;
  1127 + FILE* f = nullptr;
  1128 + std::shared_ptr<Pl_StdioFile> f_pl;
  1129 + std::string filename;
  1130 + if (this->m->json_stream_data == qpdf_sj_file) {
  1131 + filename = file_prefix + "-" + QUtil::int_to_string(obj.getObjectID());
  1132 + f = QUtil::safe_fopen(filename.c_str(), "wb");
  1133 + f_pl = std::make_shared<Pl_StdioFile>("stream data", f);
  1134 + stream_p = f_pl.get();
  1135 + }
  1136 + auto j = JSON::makeDictionary();
  1137 + j.addDictionaryMember(
  1138 + "stream",
  1139 + obj.getStreamJSON(
  1140 + this->m->json_version,
  1141 + this->m->json_stream_data,
  1142 + this->m->decode_level,
  1143 + stream_p,
  1144 + filename));
  1145 +
  1146 + JSON::writeDictionaryItem(p, first, "obj:" + obj.unparse(), j, 2);
  1147 + if (f) {
  1148 + f_pl->finish();
  1149 + f_pl = nullptr;
  1150 + fclose(f);
  1151 + }
  1152 +}
  1153 +
  1154 +void
  1155 +QPDFJob::doJSONObject(
  1156 + Pipeline* p,
  1157 + bool& first,
  1158 + QPDF& pdf,
  1159 + std::string const& key,
  1160 + QPDFObjectHandle& obj)
  1161 +{
  1162 + auto j = JSON::makeDictionary();
  1163 + j.addDictionaryMember("value", obj.getJSON(this->m->json_version, true));
  1164 + JSON::writeDictionaryItem(p, first, key, j, 2);
  1165 +}
  1166 +
  1167 +void
  1168 +QPDFJob::doJSONQpdf(Pipeline* p, bool& first, QPDF& pdf)
  1169 +{
  1170 + std::string file_prefix = this->m->json_stream_prefix;
  1171 + if (this->m->json_stream_data == qpdf_sj_file) {
  1172 + if (file_prefix.empty()) {
  1173 + if (this->m->infilename.get()) {
  1174 + file_prefix = this->m->infilename.get();
  1175 + }
  1176 + if (file_prefix.empty()) {
  1177 + usage(
  1178 + "please specify --json-stream-prefix since the input file "
  1179 + "name is unknown");
  1180 + }
  1181 + }
  1182 + }
  1183 +
  1184 + JSON::writeDictionaryKey(p, first, "qpdf", 0);
  1185 + bool first_qpdf = true;
  1186 + JSON::writeDictionaryOpen(p, first_qpdf, 1);
  1187 + JSON::writeDictionaryItem(
  1188 + p, first_qpdf, "jsonversion", JSON::makeInt(this->m->json_version), 1);
  1189 + JSON::writeDictionaryItem(
  1190 + p, first_qpdf, "pdfversion", JSON::makeString(pdf.getPDFVersion()), 1);
  1191 + JSON::writeDictionaryKey(p, first_qpdf, "objects", 1);
  1192 + bool first_object = true;
  1193 + JSON::writeDictionaryOpen(p, first_object, 2);
  1194 + bool all_objects = m->json_objects.empty();
  1195 + std::set<QPDFObjGen> wanted_og = getWantedJSONObjects();
  1196 + std::vector<QPDFObjectHandle> objects = pdf.getAllObjects();
  1197 + for (auto& obj: objects) {
  1198 + if (all_objects || wanted_og.count(obj.getObjGen())) {
  1199 + if (obj.isStream()) {
  1200 + doJSONStream(p, first_object, pdf, obj, file_prefix);
  1201 + } else {
  1202 + doJSONObject(p, first_object, pdf, "obj:" + obj.unparse(), obj);
  1203 + }
  1204 + }
  1205 + }
  1206 + if (all_objects || m->json_objects.count("trailer")) {
  1207 + auto trailer = pdf.getTrailer();
  1208 + doJSONObject(p, first_object, pdf, "trailer", trailer);
  1209 + }
  1210 + JSON::writeDictionaryClose(p, first_object, 2);
  1211 + JSON::writeDictionaryClose(p, first_qpdf, 1);
  1212 +}
  1213 +
  1214 +void
1107 QPDFJob::doJSONPages(Pipeline* p, bool& first, QPDF& pdf) 1215 QPDFJob::doJSONPages(Pipeline* p, bool& first, QPDF& pdf)
1108 { 1216 {
1109 JSON::writeDictionaryKey(p, first, "pages", 0); 1217 JSON::writeDictionaryKey(p, first, "pages", 0);
@@ -1482,14 +1590,15 @@ QPDFJob::json_schema(int json_version, std::set&lt;std::string&gt;* keys) @@ -1482,14 +1590,15 @@ QPDFJob::json_schema(int json_version, std::set&lt;std::string&gt;* keys)
1482 // The list of selectable top-level keys id duplicated in the 1590 // The list of selectable top-level keys id duplicated in the
1483 // following places: job.yml, QPDFJob::json_schema, and 1591 // following places: job.yml, QPDFJob::json_schema, and
1484 // QPDFJob::doJSON. 1592 // QPDFJob::doJSON.
1485 - if (all_keys || keys->count("objects")) {  
1486 - schema.addDictionaryMember("objects", JSON::parse(R"({ 1593 + if (json_version == 1) {
  1594 + if (all_keys || keys->count("objects")) {
  1595 + schema.addDictionaryMember("objects", JSON::parse(R"({
1487 "<n n R|trailer>": "json representation of object" 1596 "<n n R|trailer>": "json representation of object"
1488 })")); 1597 })"));
1489 - }  
1490 - if (all_keys || keys->count("objectinfo")) {  
1491 - JSON objectinfo =  
1492 - schema.addDictionaryMember("objectinfo", JSON::parse(R"({ 1598 + }
  1599 + if (all_keys || keys->count("objectinfo")) {
  1600 + JSON objectinfo =
  1601 + schema.addDictionaryMember("objectinfo", JSON::parse(R"({
1493 "<object-id>": { 1602 "<object-id>": {
1494 "stream": { 1603 "stream": {
1495 "filter": "if stream, its filters, otherwise null", 1604 "filter": "if stream, its filters, otherwise null",
@@ -1498,6 +1607,17 @@ QPDFJob::json_schema(int json_version, std::set&lt;std::string&gt;* keys) @@ -1498,6 +1607,17 @@ QPDFJob::json_schema(int json_version, std::set&lt;std::string&gt;* keys)
1498 } 1607 }
1499 } 1608 }
1500 })")); 1609 })"));
  1610 + }
  1611 + } else {
  1612 + if (all_keys || keys->count("qpdf")) {
  1613 + schema.addDictionaryMember("qpdf", JSON::parse(R"({
  1614 + "jsonversion": "qpdf json output version",
  1615 + "pdfversion": "PDF version from PDF header",
  1616 + "objects": {
  1617 + "<obj:n n R|trailer>": "json representation of object"
  1618 + }
  1619 +})"));
  1620 + }
1501 } 1621 }
1502 if (all_keys || keys->count("pages")) { 1622 if (all_keys || keys->count("pages")) {
1503 JSON page = schema.addDictionaryMember("pages", JSON::parse(R"([ 1623 JSON page = schema.addDictionaryMember("pages", JSON::parse(R"([
@@ -1705,15 +1825,21 @@ QPDFJob::doJSON(QPDF&amp; pdf, Pipeline* p) @@ -1705,15 +1825,21 @@ QPDFJob::doJSON(QPDF&amp; pdf, Pipeline* p)
1705 doJSONOutlines(p, first, pdf); 1825 doJSONOutlines(p, first, pdf);
1706 } 1826 }
1707 1827
1708 - // We do objects and objectinfo last so their information is  
1709 - // consistent with repairing the page tree. To see the original  
1710 - // file with any page tree problems and the page tree not  
1711 - // flattened, select objects/objectinfo without other keys.  
1712 - if (all_keys || m->json_keys.count("objects")) {  
1713 - doJSONObjects(p, first, pdf);  
1714 - }  
1715 - if (all_keys || m->json_keys.count("objectinfo")) {  
1716 - doJSONObjectinfo(p, first, pdf); 1828 + // We do objects last so their information is consistent with
  1829 + // repairing the page tree. To see the original file with any page
  1830 + // tree problems and the page tree not flattened, select
  1831 + // objects/objectinfo without other keys.
  1832 + if (this->m->json_version == 1) {
  1833 + if (all_keys || m->json_keys.count("objects")) {
  1834 + doJSONObjects(p, first, pdf);
  1835 + }
  1836 + if (all_keys || m->json_keys.count("objectinfo")) {
  1837 + doJSONObjectinfo(p, first, pdf);
  1838 + }
  1839 + } else {
  1840 + if (all_keys || m->json_keys.count("qpdf")) {
  1841 + doJSONQpdf(p, first, pdf);
  1842 + }
1717 } 1843 }
1718 1844
1719 JSON::writeDictionaryClose(p, first, 0); 1845 JSON::writeDictionaryClose(p, first, 0);
libqpdf/QPDFJob_config.cc
@@ -261,6 +261,29 @@ QPDFJob::Config::jsonObject(std::string const&amp; parameter) @@ -261,6 +261,29 @@ QPDFJob::Config::jsonObject(std::string const&amp; parameter)
261 } 261 }
262 262
263 QPDFJob::Config* 263 QPDFJob::Config*
  264 +QPDFJob::Config::jsonStreamData(std::string const& parameter)
  265 +{
  266 + if (parameter == "none") {
  267 + o.m->json_stream_data = qpdf_sj_none;
  268 + } else if (parameter == "inline") {
  269 + o.m->json_stream_data = qpdf_sj_inline;
  270 + } else if (parameter == "file") {
  271 + o.m->json_stream_data = qpdf_sj_file;
  272 + } else {
  273 + usage("invalid json-streams option");
  274 + }
  275 +
  276 + return this;
  277 +}
  278 +
  279 +QPDFJob::Config*
  280 +QPDFJob::Config::jsonStreamPrefix(std::string const& parameter)
  281 +{
  282 + o.m->json_stream_prefix = parameter;
  283 + return this;
  284 +}
  285 +
  286 +QPDFJob::Config*
264 QPDFJob::Config::testJsonSchema() 287 QPDFJob::Config::testJsonSchema()
265 { 288 {
266 o.m->test_json_schema = true; 289 o.m->test_json_schema = true;
libqpdf/QPDFObjectHandle.cc
@@ -1800,7 +1800,7 @@ QPDFObjectHandle::getJSON(int json_version, bool dereference_indirect) @@ -1800,7 +1800,7 @@ QPDFObjectHandle::getJSON(int json_version, bool dereference_indirect)
1800 JSON 1800 JSON
1801 QPDFObjectHandle::getStreamJSON( 1801 QPDFObjectHandle::getStreamJSON(
1802 int json_version, 1802 int json_version,
1803 - qpdf_stream_data_json_e json_data, 1803 + qpdf_json_stream_data_e json_data,
1804 qpdf_stream_decode_level_e decode_level, 1804 qpdf_stream_decode_level_e decode_level,
1805 Pipeline* p, 1805 Pipeline* p,
1806 std::string const& data_filename) 1806 std::string const& data_filename)
libqpdf/QPDF_Stream.cc
@@ -189,7 +189,7 @@ QPDF_Stream::getJSON(int json_version) @@ -189,7 +189,7 @@ QPDF_Stream::getJSON(int json_version)
189 JSON 189 JSON
190 QPDF_Stream::getStreamJSON( 190 QPDF_Stream::getStreamJSON(
191 int json_version, 191 int json_version,
192 - qpdf_stream_data_json_e json_data, 192 + qpdf_json_stream_data_e json_data,
193 qpdf_stream_decode_level_e decode_level, 193 qpdf_stream_decode_level_e decode_level,
194 Pipeline* p, 194 Pipeline* p,
195 std::string const& data_filename) 195 std::string const& data_filename)
@@ -231,11 +231,17 @@ QPDF_Stream::getStreamJSON( @@ -231,11 +231,17 @@ QPDF_Stream::getStreamJSON(
231 } else { 231 } else {
232 data_pipeline = &discard; 232 data_pipeline = &discard;
233 } 233 }
234 - filtered = pipeStreamData(  
235 - data_pipeline, nullptr, 0, decode_level, false, (attempt == 1));  
236 - if (filter && (!filtered)) { 234 + bool succeeded = pipeStreamData(
  235 + data_pipeline,
  236 + &filtered,
  237 + 0,
  238 + decode_level,
  239 + false,
  240 + (attempt == 1));
  241 + if ((!succeeded) || (filter && (!filtered))) {
237 // Try again 242 // Try again
238 filter = false; 243 filter = false;
  244 + decode_level = qpdf_dl_none;
239 } else { 245 } else {
240 if (buf_pl.get()) { 246 if (buf_pl.get()) {
241 buf = buf_pl->getBufferSharedPointer(); 247 buf = buf_pl->getBufferSharedPointer();
@@ -247,7 +253,7 @@ QPDF_Stream::getStreamJSON( @@ -247,7 +253,7 @@ QPDF_Stream::getStreamJSON(
247 // touching top-level keys. 253 // touching top-level keys.
248 dict = this->stream_dict.unsafeShallowCopy(); 254 dict = this->stream_dict.unsafeShallowCopy();
249 dict.removeKey("/Length"); 255 dict.removeKey("/Length");
250 - if (filtered) { 256 + if (filter && filtered) {
251 dict.removeKey("/Filter"); 257 dict.removeKey("/Filter");
252 dict.removeKey("/DecodeParms"); 258 dict.removeKey("/DecodeParms");
253 } 259 }
libqpdf/qpdf/QPDF_Stream.hh
@@ -63,7 +63,7 @@ class QPDF_Stream: public QPDFObject @@ -63,7 +63,7 @@ class QPDF_Stream: public QPDFObject
63 addTokenFilter(std::shared_ptr<QPDFObjectHandle::TokenFilter> token_filter); 63 addTokenFilter(std::shared_ptr<QPDFObjectHandle::TokenFilter> token_filter);
64 JSON getStreamJSON( 64 JSON getStreamJSON(
65 int json_version, 65 int json_version,
66 - qpdf_stream_data_json_e json_data, 66 + qpdf_json_stream_data_e json_data,
67 qpdf_stream_decode_level_e decode_level, 67 qpdf_stream_decode_level_e decode_level,
68 Pipeline* p, 68 Pipeline* p,
69 std::string const& data_filename); 69 std::string const& data_filename);
libqpdf/qpdf/auto_job_help.hh
@@ -817,6 +817,21 @@ objects will be shown. @@ -817,6 +817,21 @@ objects will be shown.
817 ap.addOptionHelp("--job-json-help", "json", "show format of job JSON", R"(Describe the format of the QPDFJob JSON input used by 817 ap.addOptionHelp("--job-json-help", "json", "show format of job JSON", R"(Describe the format of the QPDFJob JSON input used by
818 --job-json-file. 818 --job-json-file.
819 )"); 819 )");
  820 +ap.addOptionHelp("--json-stream-data", "json", "how to handle streams in json output", R"(--json-stream-data={none|inline|file}
  821 +
  822 +Control whether streams in json output should be omitted,
  823 +written inline (base64-encoded) or written to a file. If "file"
  824 +is chosen, the file will be the name of the input file appended
  825 +with -nnn where nnn is the object number. The prefix can be
  826 +overridden with --json-stream-prefix.
  827 +)");
  828 +ap.addOptionHelp("--json-stream-prefix", "json", "prefix for json stream data files", R"(--json-stream-prefix=file-prefix
  829 +
  830 +When --json-stream-data=file is given, override the input file
  831 +name as the prefix for stream data files. Whatever is given here
  832 +will be appended with -nnn to create the name of the file that
  833 +will contain the data for the stream stream in object nnn.
  834 +)");
820 ap.addHelpTopic("testing", "options for testing or debugging", R"(The options below are useful when writing automated test code that 835 ap.addHelpTopic("testing", "options for testing or debugging", R"(The options below are useful when writing automated test code that
821 includes files created by qpdf or when testing qpdf itself. 836 includes files created by qpdf or when testing qpdf itself.
822 )"); 837 )");
@@ -829,6 +844,9 @@ for testing only so that output files can be reproducible. Never @@ -829,6 +844,9 @@ for testing only so that output files can be reproducible. Never
829 use it for production files. This option is not secure since it 844 use it for production files. This option is not secure since it
830 significantly weakens the encryption. 845 significantly weakens the encryption.
831 )"); 846 )");
  847 +}
  848 +static void add_help_8(QPDFArgParser& ap)
  849 +{
832 ap.addOptionHelp("--linearize-pass1", "testing", "save pass 1 of linearization", R"(--linearize-pass1=file 850 ap.addOptionHelp("--linearize-pass1", "testing", "save pass 1 of linearization", R"(--linearize-pass1=file
833 851
834 Write the first pass of linearization to the named file. The 852 Write the first pass of linearization to the named file. The
@@ -839,9 +857,6 @@ ap.addOptionHelp(&quot;--test-json-schema&quot;, &quot;testing&quot;, &quot;test generated json against s @@ -839,9 +857,6 @@ ap.addOptionHelp(&quot;--test-json-schema&quot;, &quot;testing&quot;, &quot;test generated json against s
839 the output of qpdf --json and the output of qpdf --json-help. 857 the output of qpdf --json and the output of qpdf --json-help.
840 )"); 858 )");
841 } 859 }
842 -static void add_help_8(QPDFArgParser& ap)  
843 -{  
844 -}  
845 static void add_help(QPDFArgParser& ap) 860 static void add_help(QPDFArgParser& ap)
846 { 861 {
847 add_help_1(ap); 862 add_help_1(ap);
libqpdf/qpdf/auto_job_init.hh
@@ -20,7 +20,8 @@ static char const* object_streams_choices[] = {&quot;disable&quot;, &quot;preserve&quot;, &quot;generate&quot; @@ -20,7 +20,8 @@ static char const* object_streams_choices[] = {&quot;disable&quot;, &quot;preserve&quot;, &quot;generate&quot;
20 static char const* remove_unref_choices[] = {"auto", "yes", "no", 0}; 20 static char const* remove_unref_choices[] = {"auto", "yes", "no", 0};
21 static char const* flatten_choices[] = {"all", "print", "screen", 0}; 21 static char const* flatten_choices[] = {"all", "print", "screen", 0};
22 static char const* json_version_choices[] = {"1", "2", "latest", 0}; 22 static char const* json_version_choices[] = {"1", "2", "latest", 0};
23 -static char const* json_key_choices[] = {"acroform", "attachments", "encrypt", "objectinfo", "objects", "outlines", "pagelabels", "pages", 0}; 23 +static char const* json_key_choices[] = {"acroform", "attachments", "encrypt", "objectinfo", "objects", "outlines", "pagelabels", "pages", "qpdf", 0};
  24 +static char const* json_stream_data_choices[] = {"none", "inline", "file", 0};
24 static char const* print128_choices[] = {"full", "low", "none", 0}; 25 static char const* print128_choices[] = {"full", "low", "none", 0};
25 static char const* modify128_choices[] = {"all", "annotate", "form", "assembly", "none", 0}; 26 static char const* modify128_choices[] = {"all", "annotate", "form", "assembly", "none", 0};
26 27
@@ -101,6 +102,7 @@ this-&gt;ap.addRequiredParameter(&quot;remove-attachment&quot;, [this](std::string const&amp; x){ @@ -101,6 +102,7 @@ this-&gt;ap.addRequiredParameter(&quot;remove-attachment&quot;, [this](std::string const&amp; x){
101 this->ap.addRequiredParameter("rotate", [this](std::string const& x){c_main->rotate(x);}, "[+|-]angle"); 102 this->ap.addRequiredParameter("rotate", [this](std::string const& x){c_main->rotate(x);}, "[+|-]angle");
102 this->ap.addRequiredParameter("show-attachment", [this](std::string const& x){c_main->showAttachment(x);}, "attachment"); 103 this->ap.addRequiredParameter("show-attachment", [this](std::string const& x){c_main->showAttachment(x);}, "attachment");
103 this->ap.addRequiredParameter("show-object", [this](std::string const& x){c_main->showObject(x);}, "trailer"); 104 this->ap.addRequiredParameter("show-object", [this](std::string const& x){c_main->showObject(x);}, "trailer");
  105 +this->ap.addRequiredParameter("json-stream-prefix", [this](std::string const& x){c_main->jsonStreamPrefix(x);}, "stream-file-prefix");
104 this->ap.addOptionalParameter("collate", [this](std::string const& x){c_main->collate(x);}); 106 this->ap.addOptionalParameter("collate", [this](std::string const& x){c_main->collate(x);});
105 this->ap.addOptionalParameter("split-pages", [this](std::string const& x){c_main->splitPages(x);}); 107 this->ap.addOptionalParameter("split-pages", [this](std::string const& x){c_main->splitPages(x);});
106 this->ap.addChoices("compress-streams", [this](std::string const& x){c_main->compressStreams(x);}, true, yn_choices); 108 this->ap.addChoices("compress-streams", [this](std::string const& x){c_main->compressStreams(x);}, true, yn_choices);
@@ -113,6 +115,7 @@ this-&gt;ap.addChoices(&quot;object-streams&quot;, [this](std::string const&amp; x){c_main-&gt;objec @@ -113,6 +115,7 @@ this-&gt;ap.addChoices(&quot;object-streams&quot;, [this](std::string const&amp; x){c_main-&gt;objec
113 this->ap.addChoices("password-mode", [this](std::string const& x){c_main->passwordMode(x);}, true, password_mode_choices); 115 this->ap.addChoices("password-mode", [this](std::string const& x){c_main->passwordMode(x);}, true, password_mode_choices);
114 this->ap.addChoices("remove-unreferenced-resources", [this](std::string const& x){c_main->removeUnreferencedResources(x);}, true, remove_unref_choices); 116 this->ap.addChoices("remove-unreferenced-resources", [this](std::string const& x){c_main->removeUnreferencedResources(x);}, true, remove_unref_choices);
115 this->ap.addChoices("stream-data", [this](std::string const& x){c_main->streamData(x);}, true, stream_data_choices); 117 this->ap.addChoices("stream-data", [this](std::string const& x){c_main->streamData(x);}, true, stream_data_choices);
  118 +this->ap.addChoices("json-stream-data", [this](std::string const& x){c_main->jsonStreamData(x);}, true, json_stream_data_choices);
116 this->ap.addChoices("json", [this](std::string const& x){c_main->json(x);}, false, json_version_choices); 119 this->ap.addChoices("json", [this](std::string const& x){c_main->json(x);}, false, json_version_choices);
117 this->ap.registerOptionTable("pages", b(&ArgParser::argEndPages)); 120 this->ap.registerOptionTable("pages", b(&ArgParser::argEndPages));
118 this->ap.addPositional(p(&ArgParser::argPagesPositional)); 121 this->ap.addPositional(p(&ArgParser::argPagesPositional));
libqpdf/qpdf/auto_job_json_init.hh
@@ -13,7 +13,8 @@ static char const* object_streams_choices[] = {&quot;disable&quot;, &quot;preserve&quot;, &quot;generate&quot; @@ -13,7 +13,8 @@ static char const* object_streams_choices[] = {&quot;disable&quot;, &quot;preserve&quot;, &quot;generate&quot;
13 static char const* remove_unref_choices[] = {"auto", "yes", "no", 0}; 13 static char const* remove_unref_choices[] = {"auto", "yes", "no", 0};
14 static char const* flatten_choices[] = {"all", "print", "screen", 0}; 14 static char const* flatten_choices[] = {"all", "print", "screen", 0};
15 static char const* json_version_choices[] = {"1", "2", "latest", 0}; 15 static char const* json_version_choices[] = {"1", "2", "latest", 0};
16 -static char const* json_key_choices[] = {"acroform", "attachments", "encrypt", "objectinfo", "objects", "outlines", "pagelabels", "pages", 0}; 16 +static char const* json_key_choices[] = {"acroform", "attachments", "encrypt", "objectinfo", "objects", "outlines", "pagelabels", "pages", "qpdf", 0};
  17 +static char const* json_stream_data_choices[] = {"none", "inline", "file", 0};
17 static char const* print128_choices[] = {"full", "low", "none", 0}; 18 static char const* print128_choices[] = {"full", "low", "none", 0};
18 static char const* modify128_choices[] = {"all", "annotate", "form", "assembly", "none", 0}; 19 static char const* modify128_choices[] = {"all", "annotate", "form", "assembly", "none", 0};
19 20
@@ -252,6 +253,12 @@ beginArray(bindJSON(&amp;Handlers::beginJsonObjectArray), bindBare(&amp;Handlers::endJso @@ -252,6 +253,12 @@ beginArray(bindJSON(&amp;Handlers::beginJsonObjectArray), bindBare(&amp;Handlers::endJso
252 addParameter([this](std::string const& p) { c_main->jsonObject(p); }); 253 addParameter([this](std::string const& p) { c_main->jsonObject(p); });
253 popHandler(); // array: .jsonObject[] 254 popHandler(); // array: .jsonObject[]
254 popHandler(); // key: jsonObject 255 popHandler(); // key: jsonObject
  256 +pushKey("jsonStreamData");
  257 +addChoices(json_stream_data_choices, true, [this](std::string const& p) { c_main->jsonStreamData(p); });
  258 +popHandler(); // key: jsonStreamData
  259 +pushKey("jsonStreamPrefix");
  260 +addParameter([this](std::string const& p) { c_main->jsonStreamPrefix(p); });
  261 +popHandler(); // key: jsonStreamPrefix
255 pushKey("allowWeakCrypto"); 262 pushKey("allowWeakCrypto");
256 addBare([this]() { c_main->allowWeakCrypto(); }); 263 addBare([this]() { c_main->allowWeakCrypto(); });
257 popHandler(); // key: allowWeakCrypto 264 popHandler(); // key: allowWeakCrypto
libqpdf/qpdf/auto_job_schema.hh
@@ -84,6 +84,8 @@ static constexpr char const* JOB_SCHEMA_DATA = R&quot;({ @@ -84,6 +84,8 @@ static constexpr char const* JOB_SCHEMA_DATA = R&quot;({
84 "jsonObject": [ 84 "jsonObject": [
85 "limit which objects are in JSON" 85 "limit which objects are in JSON"
86 ], 86 ],
  87 + "jsonStreamData": "how to handle streams in json output",
  88 + "jsonStreamPrefix": "prefix for json stream data files",
87 "allowWeakCrypto": "allow insecure cryptographic algorithms", 89 "allowWeakCrypto": "allow insecure cryptographic algorithms",
88 "keepFilesOpen": "manage keeping multiple files open", 90 "keepFilesOpen": "manage keeping multiple files open",
89 "keepFilesOpenThreshold": "set threshold for keepFilesOpen", 91 "keepFilesOpenThreshold": "set threshold for keepFilesOpen",
manual/cli.rst
@@ -3225,6 +3225,37 @@ Related Options @@ -3225,6 +3225,37 @@ Related Options
3225 :qpdf:ref:`--job-json-file`. For more information about QPDFJob, 3225 :qpdf:ref:`--job-json-file`. For more information about QPDFJob,
3226 see :ref:`qpdf-job`. 3226 see :ref:`qpdf-job`.
3227 3227
  3228 +.. qpdf:option:: --json-stream-data={none|inline|file}
  3229 +
  3230 + .. help: how to handle streams in json output
  3231 +
  3232 + Control whether streams in json output should be omitted,
  3233 + written inline (base64-encoded) or written to a file. If "file"
  3234 + is chosen, the file will be the name of the input file appended
  3235 + with -nnn where nnn is the object number. The prefix can be
  3236 + overridden with --json-stream-prefix.
  3237 +
  3238 + Control whether streams in json output should be omitted, written
  3239 + inline (base64-encoded) or written to a file. If ``file`` is
  3240 + chosen, the file will be the name of the input file appended with
  3241 + :samp:`-{nnn}` where :samp:`{nnn}` is the object number. The prefix
  3242 + can be overridden with :qpdf:ref:`--json-stream-prefix`.
  3243 +
  3244 +.. qpdf:option:: --json-stream-prefix=file-prefix
  3245 +
  3246 + .. help: prefix for json stream data files
  3247 +
  3248 + When --json-stream-data=file is given, override the input file
  3249 + name as the prefix for stream data files. Whatever is given here
  3250 + will be appended with -nnn to create the name of the file that
  3251 + will contain the data for the stream stream in object nnn.
  3252 +
  3253 + When :qpdf:ref:`--json-stream-data` is given with the value
  3254 + ``file``, override the input file name as the prefix for stream
  3255 + data files. Whatever is given here will be appended with
  3256 + :samp:`-{nnn}` to create the name of the file that will contain the
  3257 + data for the stream stream in object :samp:`{nnn}`.
  3258 +
3228 .. _test-options: 3259 .. _test-options:
3229 3260
3230 Options for Testing or Debugging 3261 Options for Testing or Debugging
qpdf/qtest/qpdf.test
@@ -1139,9 +1139,9 @@ foreach my $d (@json_files) @@ -1139,9 +1139,9 @@ foreach my $d (@json_files)
1139 $td->NORMALIZE_NEWLINES); 1139 $td->NORMALIZE_NEWLINES);
1140 $td->runtest("json v2 $out", 1140 $td->runtest("json v2 $out",
1141 {$td->COMMAND => 1141 {$td->COMMAND =>
1142 - ['qpdf', '--json=2', '--test-json-schema', @v1_xargs, $in]}, 1142 + ['qpdf', '--json=2', '--test-json-schema', @$xargs, $in]},
1143 {$td->FILE => "$out-v2.out", $td->EXIT_STATUS => 0}, 1143 {$td->FILE => "$out-v2.out", $td->EXIT_STATUS => 0},
1144 - $td->NORMALIZE_NEWLINES | $td->EXPECT_FAILURE); 1144 + $td->NORMALIZE_NEWLINES);
1145 } 1145 }
1146 1146
1147 show_ntests(); 1147 show_ntests();
@@ -2886,14 +2886,13 @@ foreach my $f (qw(page_api_2 direct-pages)) @@ -2886,14 +2886,13 @@ foreach my $f (qw(page_api_2 direct-pages))
2886 $td->runtest("json for $f (objects only)", 2886 $td->runtest("json for $f (objects only)",
2887 {$td->COMMAND => 2887 {$td->COMMAND =>
2888 "qpdf --json=latest $f.pdf" . 2888 "qpdf --json=latest $f.pdf" .
2889 - " --json-key=objects --json-key=objectinfo"}, 2889 + " --json-key=qpdf"},
2890 {$td->FILE => "$f-json-objects.out", $td->EXIT_STATUS => 0}, 2890 {$td->FILE => "$f-json-objects.out", $td->EXIT_STATUS => 0},
2891 $td->NORMALIZE_NEWLINES); 2891 $td->NORMALIZE_NEWLINES);
2892 $td->runtest("json for $f (with pages)", 2892 $td->runtest("json for $f (with pages)",
2893 {$td->COMMAND => 2893 {$td->COMMAND =>
2894 "qpdf --json=latest $f.pdf" . 2894 "qpdf --json=latest $f.pdf" .
2895 - " --json-key=objects --json-key=objectinfo" .  
2896 - " --json-key=pages"}, 2895 + " --json-key=qpdf --json-key=pages"},
2897 {$td->FILE => "$f-json-pages.out", $td->EXIT_STATUS => 0}, 2896 {$td->FILE => "$f-json-pages.out", $td->EXIT_STATUS => 0},
2898 $td->NORMALIZE_NEWLINES); 2897 $td->NORMALIZE_NEWLINES);
2899 } 2898 }
qpdf/qtest/qpdf/direct-pages-json-objects.out
@@ -3,118 +3,92 @@ @@ -3,118 +3,92 @@
3 "parameters": { 3 "parameters": {
4 "decodelevel": "generalized" 4 "decodelevel": "generalized"
5 }, 5 },
6 - "objects": {  
7 - "1 0 R": {  
8 - "/Pages": "2 0 R",  
9 - "/Type": "/Catalog"  
10 - },  
11 - "2 0 R": {  
12 - "/Count": 2,  
13 - "/Kids": [  
14 - {  
15 - "/Contents": "3 0 R",  
16 - "/MediaBox": [  
17 - 0,  
18 - 0,  
19 - 612,  
20 - 792  
21 - ],  
22 - "/Parent": "2 0 R",  
23 - "/Resources": {  
24 - "/Font": {  
25 - "/F1": "5 0 R" 6 + "qpdf": {
  7 + "jsonversion": 2,
  8 + "pdfversion": "1.3",
  9 + "objects": {
  10 + "obj:1 0 R": {
  11 + "value": {
  12 + "/Pages": "2 0 R",
  13 + "/Type": "/Catalog"
  14 + }
  15 + },
  16 + "obj:2 0 R": {
  17 + "value": {
  18 + "/Count": 2,
  19 + "/Kids": [
  20 + {
  21 + "/Contents": "3 0 R",
  22 + "/MediaBox": [
  23 + 0,
  24 + 0,
  25 + 612,
  26 + 792
  27 + ],
  28 + "/Parent": "2 0 R",
  29 + "/Resources": {
  30 + "/Font": {
  31 + "/F1": "5 0 R"
  32 + },
  33 + "/ProcSet": "6 0 R"
  34 + },
  35 + "/Type": "/Page"
26 }, 36 },
27 - "/ProcSet": "6 0 R"  
28 - },  
29 - "/Type": "/Page"  
30 - },  
31 - {  
32 - "/Contents": "3 0 R",  
33 - "/MediaBox": [  
34 - 0,  
35 - 0,  
36 - 612,  
37 - 792 37 + {
  38 + "/Contents": "3 0 R",
  39 + "/MediaBox": [
  40 + 0,
  41 + 0,
  42 + 612,
  43 + 792
  44 + ],
  45 + "/Parent": "2 0 R",
  46 + "/Resources": {
  47 + "/Font": {
  48 + "/F1": "5 0 R"
  49 + },
  50 + "/ProcSet": "6 0 R"
  51 + },
  52 + "/Type": "/Page"
  53 + }
38 ], 54 ],
39 - "/Parent": "2 0 R",  
40 - "/Resources": {  
41 - "/Font": {  
42 - "/F1": "5 0 R"  
43 - },  
44 - "/ProcSet": "6 0 R"  
45 - },  
46 - "/Type": "/Page" 55 + "/Type": "/Pages"
  56 + }
  57 + },
  58 + "obj:3 0 R": {
  59 + "stream": {
  60 + "dict": {
  61 + "/Length": "4 0 R"
  62 + }
  63 + }
  64 + },
  65 + "obj:4 0 R": {
  66 + "value": 44
  67 + },
  68 + "obj:5 0 R": {
  69 + "value": {
  70 + "/BaseFont": "/Helvetica",
  71 + "/Encoding": "/WinAnsiEncoding",
  72 + "/Name": "/F1",
  73 + "/Subtype": "/Type1",
  74 + "/Type": "/Font"
  75 + }
  76 + },
  77 + "obj:6 0 R": {
  78 + "value": [
  79 + "/PDF",
  80 + "/Text"
  81 + ]
  82 + },
  83 + "trailer": {
  84 + "value": {
  85 + "/ID": [
  86 + "b:1323a5937c577a66735583a93698ce3c",
  87 + "b:372cbf44f6db88ab60d9263c0f0bd26a"
  88 + ],
  89 + "/Root": "1 0 R",
  90 + "/Size": 7
47 } 91 }
48 - ],  
49 - "/Type": "/Pages"  
50 - },  
51 - "3 0 R": {  
52 - "dict": {  
53 - "/Length": "4 0 R"  
54 - }  
55 - },  
56 - "4 0 R": 44,  
57 - "5 0 R": {  
58 - "/BaseFont": "/Helvetica",  
59 - "/Encoding": "/WinAnsiEncoding",  
60 - "/Name": "/F1",  
61 - "/Subtype": "/Type1",  
62 - "/Type": "/Font"  
63 - },  
64 - "6 0 R": [  
65 - "/PDF",  
66 - "/Text"  
67 - ],  
68 - "trailer": {  
69 - "/ID": [  
70 - "b:1323a5937c577a66735583a93698ce3c",  
71 - "b:372cbf44f6db88ab60d9263c0f0bd26a"  
72 - ],  
73 - "/Root": "1 0 R",  
74 - "/Size": 7  
75 - }  
76 - },  
77 - "objectinfo": {  
78 - "1 0 R": {  
79 - "stream": {  
80 - "filter": null,  
81 - "is": false,  
82 - "length": null  
83 - }  
84 - },  
85 - "2 0 R": {  
86 - "stream": {  
87 - "filter": null,  
88 - "is": false,  
89 - "length": null  
90 - }  
91 - },  
92 - "3 0 R": {  
93 - "stream": {  
94 - "filter": null,  
95 - "is": true,  
96 - "length": 44  
97 - }  
98 - },  
99 - "4 0 R": {  
100 - "stream": {  
101 - "filter": null,  
102 - "is": false,  
103 - "length": null  
104 - }  
105 - },  
106 - "5 0 R": {  
107 - "stream": {  
108 - "filter": null,  
109 - "is": false,  
110 - "length": null  
111 - }  
112 - },  
113 - "6 0 R": {  
114 - "stream": {  
115 - "filter": null,  
116 - "is": false,  
117 - "length": null  
118 } 92 }
119 } 93 }
120 } 94 }
qpdf/qtest/qpdf/direct-pages-json-pages.out
@@ -25,134 +25,98 @@ @@ -25,134 +25,98 @@
25 "pageposfrom1": 2 25 "pageposfrom1": 2
26 } 26 }
27 ], 27 ],
28 - "objects": {  
29 - "1 0 R": {  
30 - "/Pages": "2 0 R",  
31 - "/Type": "/Catalog"  
32 - },  
33 - "2 0 R": {  
34 - "/Count": 2,  
35 - "/Kids": [  
36 - "7 0 R",  
37 - "8 0 R"  
38 - ],  
39 - "/Type": "/Pages"  
40 - },  
41 - "3 0 R": {  
42 - "dict": {  
43 - "/Length": "4 0 R"  
44 - }  
45 - },  
46 - "4 0 R": 44,  
47 - "5 0 R": {  
48 - "/BaseFont": "/Helvetica",  
49 - "/Encoding": "/WinAnsiEncoding",  
50 - "/Name": "/F1",  
51 - "/Subtype": "/Type1",  
52 - "/Type": "/Font"  
53 - },  
54 - "6 0 R": [  
55 - "/PDF",  
56 - "/Text"  
57 - ],  
58 - "7 0 R": {  
59 - "/Contents": "3 0 R",  
60 - "/MediaBox": [  
61 - 0,  
62 - 0,  
63 - 612,  
64 - 792  
65 - ],  
66 - "/Parent": "2 0 R",  
67 - "/Resources": {  
68 - "/Font": {  
69 - "/F1": "5 0 R"  
70 - },  
71 - "/ProcSet": "6 0 R" 28 + "qpdf": {
  29 + "jsonversion": 2,
  30 + "pdfversion": "1.3",
  31 + "objects": {
  32 + "obj:1 0 R": {
  33 + "value": {
  34 + "/Pages": "2 0 R",
  35 + "/Type": "/Catalog"
  36 + }
72 }, 37 },
73 - "/Type": "/Page"  
74 - },  
75 - "8 0 R": {  
76 - "/Contents": "3 0 R",  
77 - "/MediaBox": [  
78 - 0,  
79 - 0,  
80 - 612,  
81 - 792  
82 - ],  
83 - "/Parent": "2 0 R",  
84 - "/Resources": {  
85 - "/Font": {  
86 - "/F1": "5 0 R"  
87 - },  
88 - "/ProcSet": "6 0 R" 38 + "obj:2 0 R": {
  39 + "value": {
  40 + "/Count": 2,
  41 + "/Kids": [
  42 + "7 0 R",
  43 + "8 0 R"
  44 + ],
  45 + "/Type": "/Pages"
  46 + }
89 }, 47 },
90 - "/Type": "/Page"  
91 - },  
92 - "trailer": {  
93 - "/ID": [  
94 - "b:1323a5937c577a66735583a93698ce3c",  
95 - "b:372cbf44f6db88ab60d9263c0f0bd26a"  
96 - ],  
97 - "/Root": "1 0 R",  
98 - "/Size": 7  
99 - }  
100 - },  
101 - "objectinfo": {  
102 - "1 0 R": {  
103 - "stream": {  
104 - "filter": null,  
105 - "is": false,  
106 - "length": null  
107 - }  
108 - },  
109 - "2 0 R": {  
110 - "stream": {  
111 - "filter": null,  
112 - "is": false,  
113 - "length": null  
114 - }  
115 - },  
116 - "3 0 R": {  
117 - "stream": {  
118 - "filter": null,  
119 - "is": true,  
120 - "length": 44  
121 - }  
122 - },  
123 - "4 0 R": {  
124 - "stream": {  
125 - "filter": null,  
126 - "is": false,  
127 - "length": null  
128 - }  
129 - },  
130 - "5 0 R": {  
131 - "stream": {  
132 - "filter": null,  
133 - "is": false,  
134 - "length": null  
135 - }  
136 - },  
137 - "6 0 R": {  
138 - "stream": {  
139 - "filter": null,  
140 - "is": false,  
141 - "length": null  
142 - }  
143 - },  
144 - "7 0 R": {  
145 - "stream": {  
146 - "filter": null,  
147 - "is": false,  
148 - "length": null  
149 - }  
150 - },  
151 - "8 0 R": {  
152 - "stream": {  
153 - "filter": null,  
154 - "is": false,  
155 - "length": null 48 + "obj:3 0 R": {
  49 + "stream": {
  50 + "dict": {
  51 + "/Length": "4 0 R"
  52 + }
  53 + }
  54 + },
  55 + "obj:4 0 R": {
  56 + "value": 44
  57 + },
  58 + "obj:5 0 R": {
  59 + "value": {
  60 + "/BaseFont": "/Helvetica",
  61 + "/Encoding": "/WinAnsiEncoding",
  62 + "/Name": "/F1",
  63 + "/Subtype": "/Type1",
  64 + "/Type": "/Font"
  65 + }
  66 + },
  67 + "obj:6 0 R": {
  68 + "value": [
  69 + "/PDF",
  70 + "/Text"
  71 + ]
  72 + },
  73 + "obj:7 0 R": {
  74 + "value": {
  75 + "/Contents": "3 0 R",
  76 + "/MediaBox": [
  77 + 0,
  78 + 0,
  79 + 612,
  80 + 792
  81 + ],
  82 + "/Parent": "2 0 R",
  83 + "/Resources": {
  84 + "/Font": {
  85 + "/F1": "5 0 R"
  86 + },
  87 + "/ProcSet": "6 0 R"
  88 + },
  89 + "/Type": "/Page"
  90 + }
  91 + },
  92 + "obj:8 0 R": {
  93 + "value": {
  94 + "/Contents": "3 0 R",
  95 + "/MediaBox": [
  96 + 0,
  97 + 0,
  98 + 612,
  99 + 792
  100 + ],
  101 + "/Parent": "2 0 R",
  102 + "/Resources": {
  103 + "/Font": {
  104 + "/F1": "5 0 R"
  105 + },
  106 + "/ProcSet": "6 0 R"
  107 + },
  108 + "/Type": "/Page"
  109 + }
  110 + },
  111 + "trailer": {
  112 + "value": {
  113 + "/ID": [
  114 + "b:1323a5937c577a66735583a93698ce3c",
  115 + "b:372cbf44f6db88ab60d9263c0f0bd26a"
  116 + ],
  117 + "/Root": "1 0 R",
  118 + "/Size": 7
  119 + }
156 } 120 }
157 } 121 }
158 } 122 }
qpdf/qtest/qpdf/json-V4-aes-encrypt---show-encryption-key-v2.out
@@ -7,8 +7,8 @@ @@ -7,8 +7,8 @@
7 "capabilities": { 7 "capabilities": {
8 "accessibility": true, 8 "accessibility": true,
9 "extract": true, 9 "extract": true,
10 - "moddifyannotations": true,  
11 "modify": true, 10 "modify": true,
  11 + "modifyannotations": true,
12 "modifyassembly": true, 12 "modifyassembly": true,
13 "modifyforms": true, 13 "modifyforms": true,
14 "modifyother": true, 14 "modifyother": true,
qpdf/qtest/qpdf/json-V4-aes-encrypt-v2.out
@@ -7,8 +7,8 @@ @@ -7,8 +7,8 @@
7 "capabilities": { 7 "capabilities": {
8 "accessibility": true, 8 "accessibility": true,
9 "extract": true, 9 "extract": true,
10 - "moddifyannotations": true,  
11 "modify": true, 10 "modify": true,
  11 + "modifyannotations": true,
12 "modifyassembly": true, 12 "modifyassembly": true,
13 "modifyforms": true, 13 "modifyforms": true,
14 "modifyother": true, 14 "modifyother": true,
qpdf/qtest/qpdf/json-field-types---show-encryption-key-v2.out
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 "object": "4 0 R" 26 "object": "4 0 R"
27 }, 27 },
28 "choices": [], 28 "choices": [],
29 - "defaultvalue": "", 29 + "defaultvalue": "u:",
30 "fieldflags": 0, 30 "fieldflags": 0,
31 "fieldtype": "/Tx", 31 "fieldtype": "/Tx",
32 "fullname": "text", 32 "fullname": "text",
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 "parent": null, 40 "parent": null,
41 "partialname": "text", 41 "partialname": "text",
42 "quadding": 0, 42 "quadding": 0,
43 - "value": "" 43 + "value": "u:"
44 }, 44 },
45 { 45 {
46 "alternativename": "r1", 46 "alternativename": "r1",
@@ -266,7 +266,7 @@ @@ -266,7 +266,7 @@
266 "object": "10 0 R" 266 "object": "10 0 R"
267 }, 267 },
268 "choices": [], 268 "choices": [],
269 - "defaultvalue": "salad πʬ", 269 + "defaultvalue": "u:salad πʬ",
270 "fieldflags": 0, 270 "fieldflags": 0,
271 "fieldtype": "/Tx", 271 "fieldtype": "/Tx",
272 "fullname": "text2", 272 "fullname": "text2",
@@ -280,7 +280,7 @@ @@ -280,7 +280,7 @@
280 "parent": null, 280 "parent": null,
281 "partialname": "text2", 281 "partialname": "text2",
282 "quadding": 0, 282 "quadding": 0,
283 - "value": "salad πʬ" 283 + "value": "u:salad πʬ"
284 }, 284 },
285 { 285 {
286 "alternativename": "combolist1", 286 "alternativename": "combolist1",
@@ -295,7 +295,7 @@ @@ -295,7 +295,7 @@
295 "pi", 295 "pi",
296 "four" 296 "four"
297 ], 297 ],
298 - "defaultvalue": "", 298 + "defaultvalue": "u:",
299 "fieldflags": 393216, 299 "fieldflags": 393216,
300 "fieldtype": "/Ch", 300 "fieldtype": "/Ch",
301 "fullname": "combolist1", 301 "fullname": "combolist1",
@@ -309,7 +309,7 @@ @@ -309,7 +309,7 @@
309 "parent": null, 309 "parent": null,
310 "partialname": "combolist1", 310 "partialname": "combolist1",
311 "quadding": 0, 311 "quadding": 0,
312 - "value": "" 312 + "value": "u:"
313 }, 313 },
314 { 314 {
315 "alternativename": "list1", 315 "alternativename": "list1",
@@ -324,7 +324,7 @@ @@ -324,7 +324,7 @@
324 "seven", 324 "seven",
325 "eight" 325 "eight"
326 ], 326 ],
327 - "defaultvalue": "", 327 + "defaultvalue": "u:",
328 "fieldflags": 0, 328 "fieldflags": 0,
329 "fieldtype": "/Ch", 329 "fieldtype": "/Ch",
330 "fullname": "list1", 330 "fullname": "list1",
@@ -338,7 +338,7 @@ @@ -338,7 +338,7 @@
338 "parent": null, 338 "parent": null,
339 "partialname": "list1", 339 "partialname": "list1",
340 "quadding": 0, 340 "quadding": 0,
341 - "value": "" 341 + "value": "u:"
342 }, 342 },
343 { 343 {
344 "alternativename": "drop1", 344 "alternativename": "drop1",
@@ -353,7 +353,7 @@ @@ -353,7 +353,7 @@
353 "elephant", 353 "elephant",
354 "twelve" 354 "twelve"
355 ], 355 ],
356 - "defaultvalue": "", 356 + "defaultvalue": "u:",
357 "fieldflags": 131072, 357 "fieldflags": 131072,
358 "fieldtype": "/Ch", 358 "fieldtype": "/Ch",
359 "fullname": "drop1", 359 "fullname": "drop1",
@@ -367,7 +367,7 @@ @@ -367,7 +367,7 @@
367 "parent": null, 367 "parent": null,
368 "partialname": "drop1", 368 "partialname": "drop1",
369 "quadding": 0, 369 "quadding": 0,
370 - "value": "" 370 + "value": "u:"
371 }, 371 },
372 { 372 {
373 "alternativename": "combodrop1", 373 "alternativename": "combodrop1",
@@ -382,7 +382,7 @@ @@ -382,7 +382,7 @@
382 "gamma", 382 "gamma",
383 "delta" 383 "delta"
384 ], 384 ],
385 - "defaultvalue": "", 385 + "defaultvalue": "u:",
386 "fieldflags": 393216, 386 "fieldflags": 393216,
387 "fieldtype": "/Ch", 387 "fieldtype": "/Ch",
388 "fullname": "combodrop1", 388 "fullname": "combodrop1",
@@ -396,7 +396,7 @@ @@ -396,7 +396,7 @@
396 "parent": null, 396 "parent": null,
397 "partialname": "combodrop1", 397 "partialname": "combodrop1",
398 "quadding": 0, 398 "quadding": 0,
399 - "value": "" 399 + "value": "u:"
400 } 400 }
401 ], 401 ],
402 "hasacroform": true, 402 "hasacroform": true,
@@ -407,8 +407,8 @@ @@ -407,8 +407,8 @@
407 "capabilities": { 407 "capabilities": {
408 "accessibility": true, 408 "accessibility": true,
409 "extract": true, 409 "extract": true,
410 - "moddifyannotations": true,  
411 "modify": true, 410 "modify": true,
  411 + "modifyannotations": true,
412 "modifyassembly": true, 412 "modifyassembly": true,
413 "modifyforms": true, 413 "modifyforms": true,
414 "modifyother": true, 414 "modifyother": true,
@@ -433,7 +433,7 @@ @@ -433,7 +433,7 @@
433 "outlines": [], 433 "outlines": [],
434 "qpdf": { 434 "qpdf": {
435 "jsonversion": 2, 435 "jsonversion": 2,
436 - "pdfversion": "1.3", 436 + "pdfversion": "1.5",
437 "objects": { 437 "objects": {
438 "obj:1 0 R": { 438 "obj:1 0 R": {
439 "value": { 439 "value": {
@@ -454,7 +454,7 @@ @@ -454,7 +454,7 @@
454 ], 454 ],
455 "/NeedAppearances": true 455 "/NeedAppearances": true
456 }, 456 },
457 - "/Lang": "en-US", 457 + "/Lang": "u:en-US",
458 "/MarkInfo": { 458 "/MarkInfo": {
459 "/Marked": true 459 "/Marked": true
460 }, 460 },
@@ -472,9 +472,9 @@ @@ -472,9 +472,9 @@
472 }, 472 },
473 "obj:2 0 R": { 473 "obj:2 0 R": {
474 "value": { 474 "value": {
475 - "/CreationDate": "D:20190103125434-05'00'",  
476 - "/Creator": "Writer",  
477 - "/Producer": "LibreOffice 6.1" 475 + "/CreationDate": "u:D:20190103125434-05'00'",
  476 + "/Creator": "u:Writer",
  477 + "/Producer": "u:LibreOffice 6.1"
478 } 478 }
479 }, 479 },
480 "obj:3 0 R": { 480 "obj:3 0 R": {
@@ -491,11 +491,11 @@ @@ -491,11 +491,11 @@
491 "/AP": { 491 "/AP": {
492 "/N": "19 0 R" 492 "/N": "19 0 R"
493 }, 493 },
494 - "/DA": "0.18039 0.20392 0.21176 rg /F2 12 Tf", 494 + "/DA": "u:0.18039 0.20392 0.21176 rg /F2 12 Tf",
495 "/DR": { 495 "/DR": {
496 "/Font": "18 0 R" 496 "/Font": "18 0 R"
497 }, 497 },
498 - "/DV": "", 498 + "/DV": "u:",
499 "/F": 4, 499 "/F": 4,
500 "/FT": "/Tx", 500 "/FT": "/Tx",
501 "/P": "15 0 R", 501 "/P": "15 0 R",
@@ -506,9 +506,9 @@ @@ -506,9 +506,9 @@
506 704.699 506 704.699
507 ], 507 ],
508 "/Subtype": "/Widget", 508 "/Subtype": "/Widget",
509 - "/T": "text", 509 + "/T": "u:text",
510 "/Type": "/Annot", 510 "/Type": "/Annot",
511 - "/V": "" 511 + "/V": "u:"
512 } 512 }
513 }, 513 },
514 "obj:5 0 R": { 514 "obj:5 0 R": {
@@ -522,7 +522,7 @@ @@ -522,7 +522,7 @@
522 "23 0 R" 522 "23 0 R"
523 ], 523 ],
524 "/P": "15 0 R", 524 "/P": "15 0 R",
525 - "/T": "r1", 525 + "/T": "u:r1",
526 "/V": "/1" 526 "/V": "/1"
527 } 527 }
528 }, 528 },
@@ -535,7 +535,7 @@ @@ -535,7 +535,7 @@
535 } 535 }
536 }, 536 },
537 "/AS": "/Off", 537 "/AS": "/Off",
538 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 538 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
539 "/DR": { 539 "/DR": {
540 "/Font": { 540 "/Font": {
541 "/ZaDi": "28 0 R" 541 "/ZaDi": "28 0 R"
@@ -545,7 +545,7 @@ @@ -545,7 +545,7 @@
545 "/F": 4, 545 "/F": 4,
546 "/FT": "/Btn", 546 "/FT": "/Btn",
547 "/MK": { 547 "/MK": {
548 - "/CA": "8" 548 + "/CA": "u:8"
549 }, 549 },
550 "/P": "15 0 R", 550 "/P": "15 0 R",
551 "/Rect": [ 551 "/Rect": [
@@ -555,7 +555,7 @@ @@ -555,7 +555,7 @@
555 566.349 555 566.349
556 ], 556 ],
557 "/Subtype": "/Widget", 557 "/Subtype": "/Widget",
558 - "/T": "checkbox1", 558 + "/T": "u:checkbox1",
559 "/Type": "/Annot", 559 "/Type": "/Annot",
560 "/V": "/Off" 560 "/V": "/Off"
561 } 561 }
@@ -569,7 +569,7 @@ @@ -569,7 +569,7 @@
569 } 569 }
570 }, 570 },
571 "/AS": "/Yes", 571 "/AS": "/Yes",
572 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 572 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
573 "/DR": { 573 "/DR": {
574 "/Font": { 574 "/Font": {
575 "/ZaDi": "28 0 R" 575 "/ZaDi": "28 0 R"
@@ -579,7 +579,7 @@ @@ -579,7 +579,7 @@
579 "/F": 4, 579 "/F": 4,
580 "/FT": "/Btn", 580 "/FT": "/Btn",
581 "/MK": { 581 "/MK": {
582 - "/CA": "8" 582 + "/CA": "u:8"
583 }, 583 },
584 "/P": "15 0 R", 584 "/P": "15 0 R",
585 "/Rect": [ 585 "/Rect": [
@@ -589,7 +589,7 @@ @@ -589,7 +589,7 @@
589 539.799 589 539.799
590 ], 590 ],
591 "/Subtype": "/Widget", 591 "/Subtype": "/Widget",
592 - "/T": "checkbox2", 592 + "/T": "u:checkbox2",
593 "/Type": "/Annot", 593 "/Type": "/Annot",
594 "/V": "/Yes" 594 "/V": "/Yes"
595 } 595 }
@@ -603,7 +603,7 @@ @@ -603,7 +603,7 @@
603 } 603 }
604 }, 604 },
605 "/AS": "/Off", 605 "/AS": "/Off",
606 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 606 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
607 "/DR": { 607 "/DR": {
608 "/Font": { 608 "/Font": {
609 "/ZaDi": "28 0 R" 609 "/ZaDi": "28 0 R"
@@ -613,7 +613,7 @@ @@ -613,7 +613,7 @@
613 "/F": 4, 613 "/F": 4,
614 "/FT": "/Btn", 614 "/FT": "/Btn",
615 "/MK": { 615 "/MK": {
616 - "/CA": "8" 616 + "/CA": "u:8"
617 }, 617 },
618 "/P": "15 0 R", 618 "/P": "15 0 R",
619 "/Rect": [ 619 "/Rect": [
@@ -623,7 +623,7 @@ @@ -623,7 +623,7 @@
623 512.549 623 512.549
624 ], 624 ],
625 "/Subtype": "/Widget", 625 "/Subtype": "/Widget",
626 - "/T": "checkbox3", 626 + "/T": "u:checkbox3",
627 "/Type": "/Annot", 627 "/Type": "/Annot",
628 "/V": "/Off" 628 "/V": "/Off"
629 } 629 }
@@ -639,7 +639,7 @@ @@ -639,7 +639,7 @@
639 "39 0 R" 639 "39 0 R"
640 ], 640 ],
641 "/P": "15 0 R", 641 "/P": "15 0 R",
642 - "/T": "r2", 642 + "/T": "u:r2",
643 "/V": "/2" 643 "/V": "/2"
644 } 644 }
645 }, 645 },
@@ -648,11 +648,11 @@ @@ -648,11 +648,11 @@
648 "/AP": { 648 "/AP": {
649 "/N": "40 0 R" 649 "/N": "40 0 R"
650 }, 650 },
651 - "/DA": "0.18039 0.20392 0.21176 rg /F2 12 Tf", 651 + "/DA": "u:0.18039 0.20392 0.21176 rg /F2 12 Tf",
652 "/DR": { 652 "/DR": {
653 "/Font": "18 0 R" 653 "/Font": "18 0 R"
654 }, 654 },
655 - "/DV": "salad πʬ", 655 + "/DV": "u:salad πʬ",
656 "/F": 4, 656 "/F": 4,
657 "/FT": "/Tx", 657 "/FT": "/Tx",
658 "/P": "15 0 R", 658 "/P": "15 0 R",
@@ -663,9 +663,9 @@ @@ -663,9 +663,9 @@
663 278.099 663 278.099
664 ], 664 ],
665 "/Subtype": "/Widget", 665 "/Subtype": "/Widget",
666 - "/T": "text2", 666 + "/T": "u:text2",
667 "/Type": "/Annot", 667 "/Type": "/Annot",
668 - "/V": "salad πʬ" 668 + "/V": "u:salad πʬ"
669 } 669 }
670 }, 670 },
671 "obj:11 0 R": { 671 "obj:11 0 R": {
@@ -673,18 +673,18 @@ @@ -673,18 +673,18 @@
673 "/AP": { 673 "/AP": {
674 "/N": "42 0 R" 674 "/N": "42 0 R"
675 }, 675 },
676 - "/DA": "0.18039 0.20392 0.21176 rg /F4 10 Tf", 676 + "/DA": "u:0.18039 0.20392 0.21176 rg /F4 10 Tf",
677 "/DR": { 677 "/DR": {
678 "/Font": "18 0 R" 678 "/Font": "18 0 R"
679 }, 679 },
680 - "/DV": "", 680 + "/DV": "u:",
681 "/F": 4, 681 "/F": 4,
682 "/FT": "/Ch", 682 "/FT": "/Ch",
683 "/Opt": [ 683 "/Opt": [
684 - "five",  
685 - "six",  
686 - "seven",  
687 - "eight" 684 + "u:five",
  685 + "u:six",
  686 + "u:seven",
  687 + "u:eight"
688 ], 688 ],
689 "/P": "15 0 R", 689 "/P": "15 0 R",
690 "/Rect": [ 690 "/Rect": [
@@ -694,9 +694,9 @@ @@ -694,9 +694,9 @@
694 232.849 694 232.849
695 ], 695 ],
696 "/Subtype": "/Widget", 696 "/Subtype": "/Widget",
697 - "/T": "list1", 697 + "/T": "u:list1",
698 "/Type": "/Annot", 698 "/Type": "/Annot",
699 - "/V": "" 699 + "/V": "u:"
700 } 700 }
701 }, 701 },
702 "obj:12 0 R": { 702 "obj:12 0 R": {
@@ -704,19 +704,19 @@ @@ -704,19 +704,19 @@
704 "/AP": { 704 "/AP": {
705 "/N": "44 0 R" 705 "/N": "44 0 R"
706 }, 706 },
707 - "/DA": "0.18039 0.20392 0.21176 rg /F4 10 Tf", 707 + "/DA": "u:0.18039 0.20392 0.21176 rg /F4 10 Tf",
708 "/DR": { 708 "/DR": {
709 "/Font": "18 0 R" 709 "/Font": "18 0 R"
710 }, 710 },
711 - "/DV": "", 711 + "/DV": "u:",
712 "/F": 4, 712 "/F": 4,
713 "/FT": "/Ch", 713 "/FT": "/Ch",
714 "/Ff": 131072, 714 "/Ff": 131072,
715 "/Opt": [ 715 "/Opt": [
716 - "nine",  
717 - "ten",  
718 - "elephant",  
719 - "twelve" 716 + "u:nine",
  717 + "u:ten",
  718 + "u:elephant",
  719 + "u:twelve"
720 ], 720 ],
721 "/P": "15 0 R", 721 "/P": "15 0 R",
722 "/Rect": [ 722 "/Rect": [
@@ -726,9 +726,9 @@ @@ -726,9 +726,9 @@
726 130.949 726 130.949
727 ], 727 ],
728 "/Subtype": "/Widget", 728 "/Subtype": "/Widget",
729 - "/T": "drop1", 729 + "/T": "u:drop1",
730 "/Type": "/Annot", 730 "/Type": "/Annot",
731 - "/V": "" 731 + "/V": "u:"
732 } 732 }
733 }, 733 },
734 "obj:13 0 R": { 734 "obj:13 0 R": {
@@ -736,19 +736,19 @@ @@ -736,19 +736,19 @@
736 "/AP": { 736 "/AP": {
737 "/N": "46 0 R" 737 "/N": "46 0 R"
738 }, 738 },
739 - "/DA": "0.18039 0.20392 0.21176 rg /F4 10 Tf", 739 + "/DA": "u:0.18039 0.20392 0.21176 rg /F4 10 Tf",
740 "/DR": { 740 "/DR": {
741 "/Font": "18 0 R" 741 "/Font": "18 0 R"
742 }, 742 },
743 - "/DV": "", 743 + "/DV": "u:",
744 "/F": 4, 744 "/F": 4,
745 "/FT": "/Ch", 745 "/FT": "/Ch",
746 "/Ff": 393216, 746 "/Ff": 393216,
747 "/Opt": [ 747 "/Opt": [
748 - "one",  
749 - "two",  
750 - "pi",  
751 - "four" 748 + "u:one",
  749 + "u:two",
  750 + "u:pi",
  751 + "u:four"
752 ], 752 ],
753 "/P": "15 0 R", 753 "/P": "15 0 R",
754 "/Rect": [ 754 "/Rect": [
@@ -758,9 +758,9 @@ @@ -758,9 +758,9 @@
758 232.849 758 232.849
759 ], 759 ],
760 "/Subtype": "/Widget", 760 "/Subtype": "/Widget",
761 - "/T": "combolist1", 761 + "/T": "u:combolist1",
762 "/Type": "/Annot", 762 "/Type": "/Annot",
763 - "/V": "" 763 + "/V": "u:"
764 } 764 }
765 }, 765 },
766 "obj:14 0 R": { 766 "obj:14 0 R": {
@@ -768,19 +768,19 @@ @@ -768,19 +768,19 @@
768 "/AP": { 768 "/AP": {
769 "/N": "48 0 R" 769 "/N": "48 0 R"
770 }, 770 },
771 - "/DA": "0.18039 0.20392 0.21176 rg /F4 10 Tf", 771 + "/DA": "u:0.18039 0.20392 0.21176 rg /F4 10 Tf",
772 "/DR": { 772 "/DR": {
773 "/Font": "18 0 R" 773 "/Font": "18 0 R"
774 }, 774 },
775 - "/DV": "", 775 + "/DV": "u:",
776 "/F": 4, 776 "/F": 4,
777 "/FT": "/Ch", 777 "/FT": "/Ch",
778 "/Ff": 393216, 778 "/Ff": 393216,
779 "/Opt": [ 779 "/Opt": [
780 - "alpha",  
781 - "beta",  
782 - "gamma",  
783 - "delta" 780 + "u:alpha",
  781 + "u:beta",
  782 + "u:gamma",
  783 + "u:delta"
784 ], 784 ],
785 "/P": "15 0 R", 785 "/P": "15 0 R",
786 "/Rect": [ 786 "/Rect": [
@@ -790,9 +790,9 @@ @@ -790,9 +790,9 @@
790 135.349 790 135.349
791 ], 791 ],
792 "/Subtype": "/Widget", 792 "/Subtype": "/Widget",
793 - "/T": "combodrop1", 793 + "/T": "u:combodrop1",
794 "/Type": "/Annot", 794 "/Type": "/Annot",
795 - "/V": "" 795 + "/V": "u:"
796 } 796 }
797 }, 797 },
798 "obj:15 0 R": { 798 "obj:15 0 R": {
@@ -898,7 +898,7 @@ @@ -898,7 +898,7 @@
898 } 898 }
899 }, 899 },
900 "/AS": "/1", 900 "/AS": "/1",
901 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 901 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
902 "/DR": { 902 "/DR": {
903 "/Font": { 903 "/Font": {
904 "/ZaDi": "28 0 R" 904 "/ZaDi": "28 0 R"
@@ -907,7 +907,7 @@ @@ -907,7 +907,7 @@
907 "/F": 4, 907 "/F": 4,
908 "/FT": "/Btn", 908 "/FT": "/Btn",
909 "/MK": { 909 "/MK": {
910 - "/CA": "l" 910 + "/CA": "u:l"
911 }, 911 },
912 "/P": "15 0 R", 912 "/P": "15 0 R",
913 "/Parent": "5 0 R", 913 "/Parent": "5 0 R",
@@ -930,7 +930,7 @@ @@ -930,7 +930,7 @@
930 } 930 }
931 }, 931 },
932 "/AS": "/Off", 932 "/AS": "/Off",
933 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 933 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
934 "/DR": { 934 "/DR": {
935 "/Font": { 935 "/Font": {
936 "/ZaDi": "28 0 R" 936 "/ZaDi": "28 0 R"
@@ -939,7 +939,7 @@ @@ -939,7 +939,7 @@
939 "/F": 4, 939 "/F": 4,
940 "/FT": "/Btn", 940 "/FT": "/Btn",
941 "/MK": { 941 "/MK": {
942 - "/CA": "l" 942 + "/CA": "u:l"
943 }, 943 },
944 "/P": "15 0 R", 944 "/P": "15 0 R",
945 "/Parent": "5 0 R", 945 "/Parent": "5 0 R",
@@ -962,7 +962,7 @@ @@ -962,7 +962,7 @@
962 } 962 }
963 }, 963 },
964 "/AS": "/Off", 964 "/AS": "/Off",
965 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 965 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
966 "/DR": { 966 "/DR": {
967 "/Font": { 967 "/Font": {
968 "/ZaDi": "28 0 R" 968 "/ZaDi": "28 0 R"
@@ -971,7 +971,7 @@ @@ -971,7 +971,7 @@
971 "/F": 4, 971 "/F": 4,
972 "/FT": "/Btn", 972 "/FT": "/Btn",
973 "/MK": { 973 "/MK": {
974 - "/CA": "l" 974 + "/CA": "u:l"
975 }, 975 },
976 "/P": "15 0 R", 976 "/P": "15 0 R",
977 "/Parent": "5 0 R", 977 "/Parent": "5 0 R",
@@ -1115,7 +1115,7 @@ @@ -1115,7 +1115,7 @@
1115 } 1115 }
1116 }, 1116 },
1117 "/AS": "/Off", 1117 "/AS": "/Off",
1118 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 1118 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
1119 "/DR": { 1119 "/DR": {
1120 "/Font": { 1120 "/Font": {
1121 "/ZaDi": "28 0 R" 1121 "/ZaDi": "28 0 R"
@@ -1124,7 +1124,7 @@ @@ -1124,7 +1124,7 @@
1124 "/F": 4, 1124 "/F": 4,
1125 "/FT": "/Btn", 1125 "/FT": "/Btn",
1126 "/MK": { 1126 "/MK": {
1127 - "/CA": "l" 1127 + "/CA": "u:l"
1128 }, 1128 },
1129 "/P": "15 0 R", 1129 "/P": "15 0 R",
1130 "/Parent": "9 0 R", 1130 "/Parent": "9 0 R",
@@ -1147,7 +1147,7 @@ @@ -1147,7 +1147,7 @@
1147 } 1147 }
1148 }, 1148 },
1149 "/AS": "/2", 1149 "/AS": "/2",
1150 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 1150 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
1151 "/DR": { 1151 "/DR": {
1152 "/Font": { 1152 "/Font": {
1153 "/ZaDi": "28 0 R" 1153 "/ZaDi": "28 0 R"
@@ -1156,7 +1156,7 @@ @@ -1156,7 +1156,7 @@
1156 "/F": 4, 1156 "/F": 4,
1157 "/FT": "/Btn", 1157 "/FT": "/Btn",
1158 "/MK": { 1158 "/MK": {
1159 - "/CA": "l" 1159 + "/CA": "u:l"
1160 }, 1160 },
1161 "/P": "15 0 R", 1161 "/P": "15 0 R",
1162 "/Parent": "9 0 R", 1162 "/Parent": "9 0 R",
@@ -1179,7 +1179,7 @@ @@ -1179,7 +1179,7 @@
1179 } 1179 }
1180 }, 1180 },
1181 "/AS": "/Off", 1181 "/AS": "/Off",
1182 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 1182 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
1183 "/DR": { 1183 "/DR": {
1184 "/Font": { 1184 "/Font": {
1185 "/ZaDi": "28 0 R" 1185 "/ZaDi": "28 0 R"
@@ -1188,7 +1188,7 @@ @@ -1188,7 +1188,7 @@
1188 "/F": 4, 1188 "/F": 4,
1189 "/FT": "/Btn", 1189 "/FT": "/Btn",
1190 "/MK": { 1190 "/MK": {
1191 - "/CA": "l" 1191 + "/CA": "u:l"
1192 }, 1192 },
1193 "/P": "15 0 R", 1193 "/P": "15 0 R",
1194 "/Parent": "9 0 R", 1194 "/Parent": "9 0 R",
@@ -3165,8 +3165,8 @@ @@ -3165,8 +3165,8 @@
3165 "value": { 3165 "value": {
3166 "/DocChecksum": "/CC322E136FE95DECF8BC297B1A9B2C2E", 3166 "/DocChecksum": "/CC322E136FE95DECF8BC297B1A9B2C2E",
3167 "/ID": [ 3167 "/ID": [
3168 - "ø«Ä{±ßTJ\rùÁZuï\u0000F",  
3169 - "ì®zg+Ìó4…[Tƒ{ —8" 3168 + "b:f8abc47bb1df544a0df9c15a75ef0046",
  3169 + "b:ecae7a672bccf334835b54867b208438"
3170 ], 3170 ],
3171 "/Info": "2 0 R", 3171 "/Info": "2 0 R",
3172 "/Root": "1 0 R", 3172 "/Root": "1 0 R",
qpdf/qtest/qpdf/json-field-types-acroform-v2.out
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 "object": "4 0 R" 13 "object": "4 0 R"
14 }, 14 },
15 "choices": [], 15 "choices": [],
16 - "defaultvalue": "", 16 + "defaultvalue": "u:",
17 "fieldflags": 0, 17 "fieldflags": 0,
18 "fieldtype": "/Tx", 18 "fieldtype": "/Tx",
19 "fullname": "text", 19 "fullname": "text",
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 "parent": null, 27 "parent": null,
28 "partialname": "text", 28 "partialname": "text",
29 "quadding": 0, 29 "quadding": 0,
30 - "value": "" 30 + "value": "u:"
31 }, 31 },
32 { 32 {
33 "alternativename": "r1", 33 "alternativename": "r1",
@@ -253,7 +253,7 @@ @@ -253,7 +253,7 @@
253 "object": "10 0 R" 253 "object": "10 0 R"
254 }, 254 },
255 "choices": [], 255 "choices": [],
256 - "defaultvalue": "salad πʬ", 256 + "defaultvalue": "u:salad πʬ",
257 "fieldflags": 0, 257 "fieldflags": 0,
258 "fieldtype": "/Tx", 258 "fieldtype": "/Tx",
259 "fullname": "text2", 259 "fullname": "text2",
@@ -267,7 +267,7 @@ @@ -267,7 +267,7 @@
267 "parent": null, 267 "parent": null,
268 "partialname": "text2", 268 "partialname": "text2",
269 "quadding": 0, 269 "quadding": 0,
270 - "value": "salad πʬ" 270 + "value": "u:salad πʬ"
271 }, 271 },
272 { 272 {
273 "alternativename": "combolist1", 273 "alternativename": "combolist1",
@@ -282,7 +282,7 @@ @@ -282,7 +282,7 @@
282 "pi", 282 "pi",
283 "four" 283 "four"
284 ], 284 ],
285 - "defaultvalue": "", 285 + "defaultvalue": "u:",
286 "fieldflags": 393216, 286 "fieldflags": 393216,
287 "fieldtype": "/Ch", 287 "fieldtype": "/Ch",
288 "fullname": "combolist1", 288 "fullname": "combolist1",
@@ -296,7 +296,7 @@ @@ -296,7 +296,7 @@
296 "parent": null, 296 "parent": null,
297 "partialname": "combolist1", 297 "partialname": "combolist1",
298 "quadding": 0, 298 "quadding": 0,
299 - "value": "" 299 + "value": "u:"
300 }, 300 },
301 { 301 {
302 "alternativename": "list1", 302 "alternativename": "list1",
@@ -311,7 +311,7 @@ @@ -311,7 +311,7 @@
311 "seven", 311 "seven",
312 "eight" 312 "eight"
313 ], 313 ],
314 - "defaultvalue": "", 314 + "defaultvalue": "u:",
315 "fieldflags": 0, 315 "fieldflags": 0,
316 "fieldtype": "/Ch", 316 "fieldtype": "/Ch",
317 "fullname": "list1", 317 "fullname": "list1",
@@ -325,7 +325,7 @@ @@ -325,7 +325,7 @@
325 "parent": null, 325 "parent": null,
326 "partialname": "list1", 326 "partialname": "list1",
327 "quadding": 0, 327 "quadding": 0,
328 - "value": "" 328 + "value": "u:"
329 }, 329 },
330 { 330 {
331 "alternativename": "drop1", 331 "alternativename": "drop1",
@@ -340,7 +340,7 @@ @@ -340,7 +340,7 @@
340 "elephant", 340 "elephant",
341 "twelve" 341 "twelve"
342 ], 342 ],
343 - "defaultvalue": "", 343 + "defaultvalue": "u:",
344 "fieldflags": 131072, 344 "fieldflags": 131072,
345 "fieldtype": "/Ch", 345 "fieldtype": "/Ch",
346 "fullname": "drop1", 346 "fullname": "drop1",
@@ -354,7 +354,7 @@ @@ -354,7 +354,7 @@
354 "parent": null, 354 "parent": null,
355 "partialname": "drop1", 355 "partialname": "drop1",
356 "quadding": 0, 356 "quadding": 0,
357 - "value": "" 357 + "value": "u:"
358 }, 358 },
359 { 359 {
360 "alternativename": "combodrop1", 360 "alternativename": "combodrop1",
@@ -369,7 +369,7 @@ @@ -369,7 +369,7 @@
369 "gamma", 369 "gamma",
370 "delta" 370 "delta"
371 ], 371 ],
372 - "defaultvalue": "", 372 + "defaultvalue": "u:",
373 "fieldflags": 393216, 373 "fieldflags": 393216,
374 "fieldtype": "/Ch", 374 "fieldtype": "/Ch",
375 "fullname": "combodrop1", 375 "fullname": "combodrop1",
@@ -383,7 +383,7 @@ @@ -383,7 +383,7 @@
383 "parent": null, 383 "parent": null,
384 "partialname": "combodrop1", 384 "partialname": "combodrop1",
385 "quadding": 0, 385 "quadding": 0,
386 - "value": "" 386 + "value": "u:"
387 } 387 }
388 ], 388 ],
389 "hasacroform": true, 389 "hasacroform": true,
qpdf/qtest/qpdf/json-field-types-v2.out
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 "object": "4 0 R" 26 "object": "4 0 R"
27 }, 27 },
28 "choices": [], 28 "choices": [],
29 - "defaultvalue": "", 29 + "defaultvalue": "u:",
30 "fieldflags": 0, 30 "fieldflags": 0,
31 "fieldtype": "/Tx", 31 "fieldtype": "/Tx",
32 "fullname": "text", 32 "fullname": "text",
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 "parent": null, 40 "parent": null,
41 "partialname": "text", 41 "partialname": "text",
42 "quadding": 0, 42 "quadding": 0,
43 - "value": "" 43 + "value": "u:"
44 }, 44 },
45 { 45 {
46 "alternativename": "r1", 46 "alternativename": "r1",
@@ -266,7 +266,7 @@ @@ -266,7 +266,7 @@
266 "object": "10 0 R" 266 "object": "10 0 R"
267 }, 267 },
268 "choices": [], 268 "choices": [],
269 - "defaultvalue": "salad πʬ", 269 + "defaultvalue": "u:salad πʬ",
270 "fieldflags": 0, 270 "fieldflags": 0,
271 "fieldtype": "/Tx", 271 "fieldtype": "/Tx",
272 "fullname": "text2", 272 "fullname": "text2",
@@ -280,7 +280,7 @@ @@ -280,7 +280,7 @@
280 "parent": null, 280 "parent": null,
281 "partialname": "text2", 281 "partialname": "text2",
282 "quadding": 0, 282 "quadding": 0,
283 - "value": "salad πʬ" 283 + "value": "u:salad πʬ"
284 }, 284 },
285 { 285 {
286 "alternativename": "combolist1", 286 "alternativename": "combolist1",
@@ -295,7 +295,7 @@ @@ -295,7 +295,7 @@
295 "pi", 295 "pi",
296 "four" 296 "four"
297 ], 297 ],
298 - "defaultvalue": "", 298 + "defaultvalue": "u:",
299 "fieldflags": 393216, 299 "fieldflags": 393216,
300 "fieldtype": "/Ch", 300 "fieldtype": "/Ch",
301 "fullname": "combolist1", 301 "fullname": "combolist1",
@@ -309,7 +309,7 @@ @@ -309,7 +309,7 @@
309 "parent": null, 309 "parent": null,
310 "partialname": "combolist1", 310 "partialname": "combolist1",
311 "quadding": 0, 311 "quadding": 0,
312 - "value": "" 312 + "value": "u:"
313 }, 313 },
314 { 314 {
315 "alternativename": "list1", 315 "alternativename": "list1",
@@ -324,7 +324,7 @@ @@ -324,7 +324,7 @@
324 "seven", 324 "seven",
325 "eight" 325 "eight"
326 ], 326 ],
327 - "defaultvalue": "", 327 + "defaultvalue": "u:",
328 "fieldflags": 0, 328 "fieldflags": 0,
329 "fieldtype": "/Ch", 329 "fieldtype": "/Ch",
330 "fullname": "list1", 330 "fullname": "list1",
@@ -338,7 +338,7 @@ @@ -338,7 +338,7 @@
338 "parent": null, 338 "parent": null,
339 "partialname": "list1", 339 "partialname": "list1",
340 "quadding": 0, 340 "quadding": 0,
341 - "value": "" 341 + "value": "u:"
342 }, 342 },
343 { 343 {
344 "alternativename": "drop1", 344 "alternativename": "drop1",
@@ -353,7 +353,7 @@ @@ -353,7 +353,7 @@
353 "elephant", 353 "elephant",
354 "twelve" 354 "twelve"
355 ], 355 ],
356 - "defaultvalue": "", 356 + "defaultvalue": "u:",
357 "fieldflags": 131072, 357 "fieldflags": 131072,
358 "fieldtype": "/Ch", 358 "fieldtype": "/Ch",
359 "fullname": "drop1", 359 "fullname": "drop1",
@@ -367,7 +367,7 @@ @@ -367,7 +367,7 @@
367 "parent": null, 367 "parent": null,
368 "partialname": "drop1", 368 "partialname": "drop1",
369 "quadding": 0, 369 "quadding": 0,
370 - "value": "" 370 + "value": "u:"
371 }, 371 },
372 { 372 {
373 "alternativename": "combodrop1", 373 "alternativename": "combodrop1",
@@ -382,7 +382,7 @@ @@ -382,7 +382,7 @@
382 "gamma", 382 "gamma",
383 "delta" 383 "delta"
384 ], 384 ],
385 - "defaultvalue": "", 385 + "defaultvalue": "u:",
386 "fieldflags": 393216, 386 "fieldflags": 393216,
387 "fieldtype": "/Ch", 387 "fieldtype": "/Ch",
388 "fullname": "combodrop1", 388 "fullname": "combodrop1",
@@ -396,7 +396,7 @@ @@ -396,7 +396,7 @@
396 "parent": null, 396 "parent": null,
397 "partialname": "combodrop1", 397 "partialname": "combodrop1",
398 "quadding": 0, 398 "quadding": 0,
399 - "value": "" 399 + "value": "u:"
400 } 400 }
401 ], 401 ],
402 "hasacroform": true, 402 "hasacroform": true,
@@ -407,8 +407,8 @@ @@ -407,8 +407,8 @@
407 "capabilities": { 407 "capabilities": {
408 "accessibility": true, 408 "accessibility": true,
409 "extract": true, 409 "extract": true,
410 - "moddifyannotations": true,  
411 "modify": true, 410 "modify": true,
  411 + "modifyannotations": true,
412 "modifyassembly": true, 412 "modifyassembly": true,
413 "modifyforms": true, 413 "modifyforms": true,
414 "modifyother": true, 414 "modifyother": true,
@@ -433,7 +433,7 @@ @@ -433,7 +433,7 @@
433 "outlines": [], 433 "outlines": [],
434 "qpdf": { 434 "qpdf": {
435 "jsonversion": 2, 435 "jsonversion": 2,
436 - "pdfversion": "1.3", 436 + "pdfversion": "1.5",
437 "objects": { 437 "objects": {
438 "obj:1 0 R": { 438 "obj:1 0 R": {
439 "value": { 439 "value": {
@@ -454,7 +454,7 @@ @@ -454,7 +454,7 @@
454 ], 454 ],
455 "/NeedAppearances": true 455 "/NeedAppearances": true
456 }, 456 },
457 - "/Lang": "en-US", 457 + "/Lang": "u:en-US",
458 "/MarkInfo": { 458 "/MarkInfo": {
459 "/Marked": true 459 "/Marked": true
460 }, 460 },
@@ -472,9 +472,9 @@ @@ -472,9 +472,9 @@
472 }, 472 },
473 "obj:2 0 R": { 473 "obj:2 0 R": {
474 "value": { 474 "value": {
475 - "/CreationDate": "D:20190103125434-05'00'",  
476 - "/Creator": "Writer",  
477 - "/Producer": "LibreOffice 6.1" 475 + "/CreationDate": "u:D:20190103125434-05'00'",
  476 + "/Creator": "u:Writer",
  477 + "/Producer": "u:LibreOffice 6.1"
478 } 478 }
479 }, 479 },
480 "obj:3 0 R": { 480 "obj:3 0 R": {
@@ -491,11 +491,11 @@ @@ -491,11 +491,11 @@
491 "/AP": { 491 "/AP": {
492 "/N": "19 0 R" 492 "/N": "19 0 R"
493 }, 493 },
494 - "/DA": "0.18039 0.20392 0.21176 rg /F2 12 Tf", 494 + "/DA": "u:0.18039 0.20392 0.21176 rg /F2 12 Tf",
495 "/DR": { 495 "/DR": {
496 "/Font": "18 0 R" 496 "/Font": "18 0 R"
497 }, 497 },
498 - "/DV": "", 498 + "/DV": "u:",
499 "/F": 4, 499 "/F": 4,
500 "/FT": "/Tx", 500 "/FT": "/Tx",
501 "/P": "15 0 R", 501 "/P": "15 0 R",
@@ -506,9 +506,9 @@ @@ -506,9 +506,9 @@
506 704.699 506 704.699
507 ], 507 ],
508 "/Subtype": "/Widget", 508 "/Subtype": "/Widget",
509 - "/T": "text", 509 + "/T": "u:text",
510 "/Type": "/Annot", 510 "/Type": "/Annot",
511 - "/V": "" 511 + "/V": "u:"
512 } 512 }
513 }, 513 },
514 "obj:5 0 R": { 514 "obj:5 0 R": {
@@ -522,7 +522,7 @@ @@ -522,7 +522,7 @@
522 "23 0 R" 522 "23 0 R"
523 ], 523 ],
524 "/P": "15 0 R", 524 "/P": "15 0 R",
525 - "/T": "r1", 525 + "/T": "u:r1",
526 "/V": "/1" 526 "/V": "/1"
527 } 527 }
528 }, 528 },
@@ -535,7 +535,7 @@ @@ -535,7 +535,7 @@
535 } 535 }
536 }, 536 },
537 "/AS": "/Off", 537 "/AS": "/Off",
538 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 538 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
539 "/DR": { 539 "/DR": {
540 "/Font": { 540 "/Font": {
541 "/ZaDi": "28 0 R" 541 "/ZaDi": "28 0 R"
@@ -545,7 +545,7 @@ @@ -545,7 +545,7 @@
545 "/F": 4, 545 "/F": 4,
546 "/FT": "/Btn", 546 "/FT": "/Btn",
547 "/MK": { 547 "/MK": {
548 - "/CA": "8" 548 + "/CA": "u:8"
549 }, 549 },
550 "/P": "15 0 R", 550 "/P": "15 0 R",
551 "/Rect": [ 551 "/Rect": [
@@ -555,7 +555,7 @@ @@ -555,7 +555,7 @@
555 566.349 555 566.349
556 ], 556 ],
557 "/Subtype": "/Widget", 557 "/Subtype": "/Widget",
558 - "/T": "checkbox1", 558 + "/T": "u:checkbox1",
559 "/Type": "/Annot", 559 "/Type": "/Annot",
560 "/V": "/Off" 560 "/V": "/Off"
561 } 561 }
@@ -569,7 +569,7 @@ @@ -569,7 +569,7 @@
569 } 569 }
570 }, 570 },
571 "/AS": "/Yes", 571 "/AS": "/Yes",
572 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 572 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
573 "/DR": { 573 "/DR": {
574 "/Font": { 574 "/Font": {
575 "/ZaDi": "28 0 R" 575 "/ZaDi": "28 0 R"
@@ -579,7 +579,7 @@ @@ -579,7 +579,7 @@
579 "/F": 4, 579 "/F": 4,
580 "/FT": "/Btn", 580 "/FT": "/Btn",
581 "/MK": { 581 "/MK": {
582 - "/CA": "8" 582 + "/CA": "u:8"
583 }, 583 },
584 "/P": "15 0 R", 584 "/P": "15 0 R",
585 "/Rect": [ 585 "/Rect": [
@@ -589,7 +589,7 @@ @@ -589,7 +589,7 @@
589 539.799 589 539.799
590 ], 590 ],
591 "/Subtype": "/Widget", 591 "/Subtype": "/Widget",
592 - "/T": "checkbox2", 592 + "/T": "u:checkbox2",
593 "/Type": "/Annot", 593 "/Type": "/Annot",
594 "/V": "/Yes" 594 "/V": "/Yes"
595 } 595 }
@@ -603,7 +603,7 @@ @@ -603,7 +603,7 @@
603 } 603 }
604 }, 604 },
605 "/AS": "/Off", 605 "/AS": "/Off",
606 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 606 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
607 "/DR": { 607 "/DR": {
608 "/Font": { 608 "/Font": {
609 "/ZaDi": "28 0 R" 609 "/ZaDi": "28 0 R"
@@ -613,7 +613,7 @@ @@ -613,7 +613,7 @@
613 "/F": 4, 613 "/F": 4,
614 "/FT": "/Btn", 614 "/FT": "/Btn",
615 "/MK": { 615 "/MK": {
616 - "/CA": "8" 616 + "/CA": "u:8"
617 }, 617 },
618 "/P": "15 0 R", 618 "/P": "15 0 R",
619 "/Rect": [ 619 "/Rect": [
@@ -623,7 +623,7 @@ @@ -623,7 +623,7 @@
623 512.549 623 512.549
624 ], 624 ],
625 "/Subtype": "/Widget", 625 "/Subtype": "/Widget",
626 - "/T": "checkbox3", 626 + "/T": "u:checkbox3",
627 "/Type": "/Annot", 627 "/Type": "/Annot",
628 "/V": "/Off" 628 "/V": "/Off"
629 } 629 }
@@ -639,7 +639,7 @@ @@ -639,7 +639,7 @@
639 "39 0 R" 639 "39 0 R"
640 ], 640 ],
641 "/P": "15 0 R", 641 "/P": "15 0 R",
642 - "/T": "r2", 642 + "/T": "u:r2",
643 "/V": "/2" 643 "/V": "/2"
644 } 644 }
645 }, 645 },
@@ -648,11 +648,11 @@ @@ -648,11 +648,11 @@
648 "/AP": { 648 "/AP": {
649 "/N": "40 0 R" 649 "/N": "40 0 R"
650 }, 650 },
651 - "/DA": "0.18039 0.20392 0.21176 rg /F2 12 Tf", 651 + "/DA": "u:0.18039 0.20392 0.21176 rg /F2 12 Tf",
652 "/DR": { 652 "/DR": {
653 "/Font": "18 0 R" 653 "/Font": "18 0 R"
654 }, 654 },
655 - "/DV": "salad πʬ", 655 + "/DV": "u:salad πʬ",
656 "/F": 4, 656 "/F": 4,
657 "/FT": "/Tx", 657 "/FT": "/Tx",
658 "/P": "15 0 R", 658 "/P": "15 0 R",
@@ -663,9 +663,9 @@ @@ -663,9 +663,9 @@
663 278.099 663 278.099
664 ], 664 ],
665 "/Subtype": "/Widget", 665 "/Subtype": "/Widget",
666 - "/T": "text2", 666 + "/T": "u:text2",
667 "/Type": "/Annot", 667 "/Type": "/Annot",
668 - "/V": "salad πʬ" 668 + "/V": "u:salad πʬ"
669 } 669 }
670 }, 670 },
671 "obj:11 0 R": { 671 "obj:11 0 R": {
@@ -673,18 +673,18 @@ @@ -673,18 +673,18 @@
673 "/AP": { 673 "/AP": {
674 "/N": "42 0 R" 674 "/N": "42 0 R"
675 }, 675 },
676 - "/DA": "0.18039 0.20392 0.21176 rg /F4 10 Tf", 676 + "/DA": "u:0.18039 0.20392 0.21176 rg /F4 10 Tf",
677 "/DR": { 677 "/DR": {
678 "/Font": "18 0 R" 678 "/Font": "18 0 R"
679 }, 679 },
680 - "/DV": "", 680 + "/DV": "u:",
681 "/F": 4, 681 "/F": 4,
682 "/FT": "/Ch", 682 "/FT": "/Ch",
683 "/Opt": [ 683 "/Opt": [
684 - "five",  
685 - "six",  
686 - "seven",  
687 - "eight" 684 + "u:five",
  685 + "u:six",
  686 + "u:seven",
  687 + "u:eight"
688 ], 688 ],
689 "/P": "15 0 R", 689 "/P": "15 0 R",
690 "/Rect": [ 690 "/Rect": [
@@ -694,9 +694,9 @@ @@ -694,9 +694,9 @@
694 232.849 694 232.849
695 ], 695 ],
696 "/Subtype": "/Widget", 696 "/Subtype": "/Widget",
697 - "/T": "list1", 697 + "/T": "u:list1",
698 "/Type": "/Annot", 698 "/Type": "/Annot",
699 - "/V": "" 699 + "/V": "u:"
700 } 700 }
701 }, 701 },
702 "obj:12 0 R": { 702 "obj:12 0 R": {
@@ -704,19 +704,19 @@ @@ -704,19 +704,19 @@
704 "/AP": { 704 "/AP": {
705 "/N": "44 0 R" 705 "/N": "44 0 R"
706 }, 706 },
707 - "/DA": "0.18039 0.20392 0.21176 rg /F4 10 Tf", 707 + "/DA": "u:0.18039 0.20392 0.21176 rg /F4 10 Tf",
708 "/DR": { 708 "/DR": {
709 "/Font": "18 0 R" 709 "/Font": "18 0 R"
710 }, 710 },
711 - "/DV": "", 711 + "/DV": "u:",
712 "/F": 4, 712 "/F": 4,
713 "/FT": "/Ch", 713 "/FT": "/Ch",
714 "/Ff": 131072, 714 "/Ff": 131072,
715 "/Opt": [ 715 "/Opt": [
716 - "nine",  
717 - "ten",  
718 - "elephant",  
719 - "twelve" 716 + "u:nine",
  717 + "u:ten",
  718 + "u:elephant",
  719 + "u:twelve"
720 ], 720 ],
721 "/P": "15 0 R", 721 "/P": "15 0 R",
722 "/Rect": [ 722 "/Rect": [
@@ -726,9 +726,9 @@ @@ -726,9 +726,9 @@
726 130.949 726 130.949
727 ], 727 ],
728 "/Subtype": "/Widget", 728 "/Subtype": "/Widget",
729 - "/T": "drop1", 729 + "/T": "u:drop1",
730 "/Type": "/Annot", 730 "/Type": "/Annot",
731 - "/V": "" 731 + "/V": "u:"
732 } 732 }
733 }, 733 },
734 "obj:13 0 R": { 734 "obj:13 0 R": {
@@ -736,19 +736,19 @@ @@ -736,19 +736,19 @@
736 "/AP": { 736 "/AP": {
737 "/N": "46 0 R" 737 "/N": "46 0 R"
738 }, 738 },
739 - "/DA": "0.18039 0.20392 0.21176 rg /F4 10 Tf", 739 + "/DA": "u:0.18039 0.20392 0.21176 rg /F4 10 Tf",
740 "/DR": { 740 "/DR": {
741 "/Font": "18 0 R" 741 "/Font": "18 0 R"
742 }, 742 },
743 - "/DV": "", 743 + "/DV": "u:",
744 "/F": 4, 744 "/F": 4,
745 "/FT": "/Ch", 745 "/FT": "/Ch",
746 "/Ff": 393216, 746 "/Ff": 393216,
747 "/Opt": [ 747 "/Opt": [
748 - "one",  
749 - "two",  
750 - "pi",  
751 - "four" 748 + "u:one",
  749 + "u:two",
  750 + "u:pi",
  751 + "u:four"
752 ], 752 ],
753 "/P": "15 0 R", 753 "/P": "15 0 R",
754 "/Rect": [ 754 "/Rect": [
@@ -758,9 +758,9 @@ @@ -758,9 +758,9 @@
758 232.849 758 232.849
759 ], 759 ],
760 "/Subtype": "/Widget", 760 "/Subtype": "/Widget",
761 - "/T": "combolist1", 761 + "/T": "u:combolist1",
762 "/Type": "/Annot", 762 "/Type": "/Annot",
763 - "/V": "" 763 + "/V": "u:"
764 } 764 }
765 }, 765 },
766 "obj:14 0 R": { 766 "obj:14 0 R": {
@@ -768,19 +768,19 @@ @@ -768,19 +768,19 @@
768 "/AP": { 768 "/AP": {
769 "/N": "48 0 R" 769 "/N": "48 0 R"
770 }, 770 },
771 - "/DA": "0.18039 0.20392 0.21176 rg /F4 10 Tf", 771 + "/DA": "u:0.18039 0.20392 0.21176 rg /F4 10 Tf",
772 "/DR": { 772 "/DR": {
773 "/Font": "18 0 R" 773 "/Font": "18 0 R"
774 }, 774 },
775 - "/DV": "", 775 + "/DV": "u:",
776 "/F": 4, 776 "/F": 4,
777 "/FT": "/Ch", 777 "/FT": "/Ch",
778 "/Ff": 393216, 778 "/Ff": 393216,
779 "/Opt": [ 779 "/Opt": [
780 - "alpha",  
781 - "beta",  
782 - "gamma",  
783 - "delta" 780 + "u:alpha",
  781 + "u:beta",
  782 + "u:gamma",
  783 + "u:delta"
784 ], 784 ],
785 "/P": "15 0 R", 785 "/P": "15 0 R",
786 "/Rect": [ 786 "/Rect": [
@@ -790,9 +790,9 @@ @@ -790,9 +790,9 @@
790 135.349 790 135.349
791 ], 791 ],
792 "/Subtype": "/Widget", 792 "/Subtype": "/Widget",
793 - "/T": "combodrop1", 793 + "/T": "u:combodrop1",
794 "/Type": "/Annot", 794 "/Type": "/Annot",
795 - "/V": "" 795 + "/V": "u:"
796 } 796 }
797 }, 797 },
798 "obj:15 0 R": { 798 "obj:15 0 R": {
@@ -898,7 +898,7 @@ @@ -898,7 +898,7 @@
898 } 898 }
899 }, 899 },
900 "/AS": "/1", 900 "/AS": "/1",
901 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 901 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
902 "/DR": { 902 "/DR": {
903 "/Font": { 903 "/Font": {
904 "/ZaDi": "28 0 R" 904 "/ZaDi": "28 0 R"
@@ -907,7 +907,7 @@ @@ -907,7 +907,7 @@
907 "/F": 4, 907 "/F": 4,
908 "/FT": "/Btn", 908 "/FT": "/Btn",
909 "/MK": { 909 "/MK": {
910 - "/CA": "l" 910 + "/CA": "u:l"
911 }, 911 },
912 "/P": "15 0 R", 912 "/P": "15 0 R",
913 "/Parent": "5 0 R", 913 "/Parent": "5 0 R",
@@ -930,7 +930,7 @@ @@ -930,7 +930,7 @@
930 } 930 }
931 }, 931 },
932 "/AS": "/Off", 932 "/AS": "/Off",
933 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 933 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
934 "/DR": { 934 "/DR": {
935 "/Font": { 935 "/Font": {
936 "/ZaDi": "28 0 R" 936 "/ZaDi": "28 0 R"
@@ -939,7 +939,7 @@ @@ -939,7 +939,7 @@
939 "/F": 4, 939 "/F": 4,
940 "/FT": "/Btn", 940 "/FT": "/Btn",
941 "/MK": { 941 "/MK": {
942 - "/CA": "l" 942 + "/CA": "u:l"
943 }, 943 },
944 "/P": "15 0 R", 944 "/P": "15 0 R",
945 "/Parent": "5 0 R", 945 "/Parent": "5 0 R",
@@ -962,7 +962,7 @@ @@ -962,7 +962,7 @@
962 } 962 }
963 }, 963 },
964 "/AS": "/Off", 964 "/AS": "/Off",
965 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 965 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
966 "/DR": { 966 "/DR": {
967 "/Font": { 967 "/Font": {
968 "/ZaDi": "28 0 R" 968 "/ZaDi": "28 0 R"
@@ -971,7 +971,7 @@ @@ -971,7 +971,7 @@
971 "/F": 4, 971 "/F": 4,
972 "/FT": "/Btn", 972 "/FT": "/Btn",
973 "/MK": { 973 "/MK": {
974 - "/CA": "l" 974 + "/CA": "u:l"
975 }, 975 },
976 "/P": "15 0 R", 976 "/P": "15 0 R",
977 "/Parent": "5 0 R", 977 "/Parent": "5 0 R",
@@ -1115,7 +1115,7 @@ @@ -1115,7 +1115,7 @@
1115 } 1115 }
1116 }, 1116 },
1117 "/AS": "/Off", 1117 "/AS": "/Off",
1118 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 1118 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
1119 "/DR": { 1119 "/DR": {
1120 "/Font": { 1120 "/Font": {
1121 "/ZaDi": "28 0 R" 1121 "/ZaDi": "28 0 R"
@@ -1124,7 +1124,7 @@ @@ -1124,7 +1124,7 @@
1124 "/F": 4, 1124 "/F": 4,
1125 "/FT": "/Btn", 1125 "/FT": "/Btn",
1126 "/MK": { 1126 "/MK": {
1127 - "/CA": "l" 1127 + "/CA": "u:l"
1128 }, 1128 },
1129 "/P": "15 0 R", 1129 "/P": "15 0 R",
1130 "/Parent": "9 0 R", 1130 "/Parent": "9 0 R",
@@ -1147,7 +1147,7 @@ @@ -1147,7 +1147,7 @@
1147 } 1147 }
1148 }, 1148 },
1149 "/AS": "/2", 1149 "/AS": "/2",
1150 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 1150 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
1151 "/DR": { 1151 "/DR": {
1152 "/Font": { 1152 "/Font": {
1153 "/ZaDi": "28 0 R" 1153 "/ZaDi": "28 0 R"
@@ -1156,7 +1156,7 @@ @@ -1156,7 +1156,7 @@
1156 "/F": 4, 1156 "/F": 4,
1157 "/FT": "/Btn", 1157 "/FT": "/Btn",
1158 "/MK": { 1158 "/MK": {
1159 - "/CA": "l" 1159 + "/CA": "u:l"
1160 }, 1160 },
1161 "/P": "15 0 R", 1161 "/P": "15 0 R",
1162 "/Parent": "9 0 R", 1162 "/Parent": "9 0 R",
@@ -1179,7 +1179,7 @@ @@ -1179,7 +1179,7 @@
1179 } 1179 }
1180 }, 1180 },
1181 "/AS": "/Off", 1181 "/AS": "/Off",
1182 - "/DA": "0.18039 0.20392 0.21176 rg /ZaDi 0 Tf", 1182 + "/DA": "u:0.18039 0.20392 0.21176 rg /ZaDi 0 Tf",
1183 "/DR": { 1183 "/DR": {
1184 "/Font": { 1184 "/Font": {
1185 "/ZaDi": "28 0 R" 1185 "/ZaDi": "28 0 R"
@@ -1188,7 +1188,7 @@ @@ -1188,7 +1188,7 @@
1188 "/F": 4, 1188 "/F": 4,
1189 "/FT": "/Btn", 1189 "/FT": "/Btn",
1190 "/MK": { 1190 "/MK": {
1191 - "/CA": "l" 1191 + "/CA": "u:l"
1192 }, 1192 },
1193 "/P": "15 0 R", 1193 "/P": "15 0 R",
1194 "/Parent": "9 0 R", 1194 "/Parent": "9 0 R",
@@ -3165,8 +3165,8 @@ @@ -3165,8 +3165,8 @@
3165 "value": { 3165 "value": {
3166 "/DocChecksum": "/CC322E136FE95DECF8BC297B1A9B2C2E", 3166 "/DocChecksum": "/CC322E136FE95DECF8BC297B1A9B2C2E",
3167 "/ID": [ 3167 "/ID": [
3168 - "ø«Ä{±ßTJ\rùÁZuï\u0000F",  
3169 - "ì®zg+Ìó4…[Tƒ{ —8" 3168 + "b:f8abc47bb1df544a0df9c15a75ef0046",
  3169 + "b:ecae7a672bccf334835b54867b208438"
3170 ], 3170 ],
3171 "/Info": "2 0 R", 3171 "/Info": "2 0 R",
3172 "/Root": "1 0 R", 3172 "/Root": "1 0 R",
qpdf/qtest/qpdf/json-image-streams-all-v2.out
@@ -250,8 +250,8 @@ @@ -250,8 +250,8 @@
250 "capabilities": { 250 "capabilities": {
251 "accessibility": true, 251 "accessibility": true,
252 "extract": true, 252 "extract": true,
253 - "moddifyannotations": true,  
254 "modify": true, 253 "modify": true,
  254 + "modifyannotations": true,
255 "modifyassembly": true, 255 "modifyassembly": true,
256 "modifyforms": true, 256 "modifyforms": true,
257 "modifyother": true, 257 "modifyother": true,
@@ -733,8 +733,8 @@ @@ -733,8 +733,8 @@
733 "trailer": { 733 "trailer": {
734 "value": { 734 "value": {
735 "/ID": [ 735 "/ID": [
736 - "S¶Ł”łîð\u000e¢¬\u0007}_)\u0012¶",  
737 - "'+“‰¤V2«PP ç`m\"˛" 736 + "b:53b6958e9beef00ea2ac077d5f2912b6",
  737 + "b:272b8d8ba45632ab505020e7606d221d"
738 ], 738 ],
739 "/Root": "1 0 R", 739 "/Root": "1 0 R",
740 "/Size": 31 740 "/Size": 31
qpdf/qtest/qpdf/json-image-streams-small-v2.out
@@ -250,8 +250,8 @@ @@ -250,8 +250,8 @@
250 "capabilities": { 250 "capabilities": {
251 "accessibility": true, 251 "accessibility": true,
252 "extract": true, 252 "extract": true,
253 - "moddifyannotations": true,  
254 "modify": true, 253 "modify": true,
  254 + "modifyannotations": true,
255 "modifyassembly": true, 255 "modifyassembly": true,
256 "modifyforms": true, 256 "modifyforms": true,
257 "modifyother": true, 257 "modifyother": true,
@@ -745,8 +745,8 @@ @@ -745,8 +745,8 @@
745 "trailer": { 745 "trailer": {
746 "value": { 746 "value": {
747 "/ID": [ 747 "/ID": [
748 - "Z§¯•Py»’~’46˛ı\u0011¢",  
749 - "Z§¯•Py»’~’46˛ı\u0011¢" 748 + "b:5aa7af805079bb907e9034361d9a11a2",
  749 + "b:5aa7af805079bb907e9034361d9a11a2"
750 ], 750 ],
751 "/Root": "1 0 R", 751 "/Root": "1 0 R",
752 "/Size": 31 752 "/Size": 31
qpdf/qtest/qpdf/json-image-streams-specialized-v2.out
@@ -250,8 +250,8 @@ @@ -250,8 +250,8 @@
250 "capabilities": { 250 "capabilities": {
251 "accessibility": true, 251 "accessibility": true,
252 "extract": true, 252 "extract": true,
253 - "moddifyannotations": true,  
254 "modify": true, 253 "modify": true,
  254 + "modifyannotations": true,
255 "modifyassembly": true, 255 "modifyassembly": true,
256 "modifyforms": true, 256 "modifyforms": true,
257 "modifyother": true, 257 "modifyother": true,
@@ -733,8 +733,8 @@ @@ -733,8 +733,8 @@
733 "trailer": { 733 "trailer": {
734 "value": { 734 "value": {
735 "/ID": [ 735 "/ID": [
736 - "S¶Ł”łîð\u000e¢¬\u0007}_)\u0012¶",  
737 - "'+“‰¤V2«PP ç`m\"˛" 736 + "b:53b6958e9beef00ea2ac077d5f2912b6",
  737 + "b:272b8d8ba45632ab505020e7606d221d"
738 ], 738 ],
739 "/Root": "1 0 R", 739 "/Root": "1 0 R",
740 "/Size": 31 740 "/Size": 31
qpdf/qtest/qpdf/json-image-streams-v2.out
@@ -250,8 +250,8 @@ @@ -250,8 +250,8 @@
250 "capabilities": { 250 "capabilities": {
251 "accessibility": true, 251 "accessibility": true,
252 "extract": true, 252 "extract": true,
253 - "moddifyannotations": true,  
254 "modify": true, 253 "modify": true,
  254 + "modifyannotations": true,
255 "modifyassembly": true, 255 "modifyassembly": true,
256 "modifyforms": true, 256 "modifyforms": true,
257 "modifyother": true, 257 "modifyother": true,
@@ -733,8 +733,8 @@ @@ -733,8 +733,8 @@
733 "trailer": { 733 "trailer": {
734 "value": { 734 "value": {
735 "/ID": [ 735 "/ID": [
736 - "S¶Ł”łîð\u000e¢¬\u0007}_)\u0012¶",  
737 - "'+“‰¤V2«PP ç`m\"˛" 736 + "b:53b6958e9beef00ea2ac077d5f2912b6",
  737 + "b:272b8d8ba45632ab505020e7606d221d"
738 ], 738 ],
739 "/Root": "1 0 R", 739 "/Root": "1 0 R",
740 "/Size": 31 740 "/Size": 31
qpdf/qtest/qpdf/json-need-appearances-acroform-v2.out
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 "object": "4 0 R" 13 "object": "4 0 R"
14 }, 14 },
15 "choices": [], 15 "choices": [],
16 - "defaultvalue": "", 16 + "defaultvalue": "u:",
17 "fieldflags": 0, 17 "fieldflags": 0,
18 "fieldtype": "/Tx", 18 "fieldtype": "/Tx",
19 "fullname": "text", 19 "fullname": "text",
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 "parent": null, 27 "parent": null,
28 "partialname": "text", 28 "partialname": "text",
29 "quadding": 0, 29 "quadding": 0,
30 - "value": "abc" 30 + "value": "u:abc"
31 }, 31 },
32 { 32 {
33 "alternativename": "r1", 33 "alternativename": "r1",
@@ -253,7 +253,7 @@ @@ -253,7 +253,7 @@
253 "object": "10 0 R" 253 "object": "10 0 R"
254 }, 254 },
255 "choices": [], 255 "choices": [],
256 - "defaultvalue": "salad πʬ", 256 + "defaultvalue": "u:salad πʬ",
257 "fieldflags": 0, 257 "fieldflags": 0,
258 "fieldtype": "/Tx", 258 "fieldtype": "/Tx",
259 "fullname": "text2", 259 "fullname": "text2",
@@ -267,7 +267,7 @@ @@ -267,7 +267,7 @@
267 "parent": null, 267 "parent": null,
268 "partialname": "text2", 268 "partialname": "text2",
269 "quadding": 0, 269 "quadding": 0,
270 - "value": "salad ÷πʬ" 270 + "value": "u:salad ÷πʬ"
271 }, 271 },
272 { 272 {
273 "alternativename": "combolist1", 273 "alternativename": "combolist1",
@@ -282,7 +282,7 @@ @@ -282,7 +282,7 @@
282 "pi", 282 "pi",
283 "four" 283 "four"
284 ], 284 ],
285 - "defaultvalue": "", 285 + "defaultvalue": "u:",
286 "fieldflags": 393216, 286 "fieldflags": 393216,
287 "fieldtype": "/Ch", 287 "fieldtype": "/Ch",
288 "fullname": "combolist1", 288 "fullname": "combolist1",
@@ -296,7 +296,7 @@ @@ -296,7 +296,7 @@
296 "parent": null, 296 "parent": null,
297 "partialname": "combolist1", 297 "partialname": "combolist1",
298 "quadding": 0, 298 "quadding": 0,
299 - "value": "pi" 299 + "value": "u:pi"
300 }, 300 },
301 { 301 {
302 "alternativename": "list1", 302 "alternativename": "list1",
@@ -311,7 +311,7 @@ @@ -311,7 +311,7 @@
311 "seven", 311 "seven",
312 "eight" 312 "eight"
313 ], 313 ],
314 - "defaultvalue": "", 314 + "defaultvalue": "u:",
315 "fieldflags": 0, 315 "fieldflags": 0,
316 "fieldtype": "/Ch", 316 "fieldtype": "/Ch",
317 "fullname": "list1", 317 "fullname": "list1",
@@ -325,7 +325,7 @@ @@ -325,7 +325,7 @@
325 "parent": null, 325 "parent": null,
326 "partialname": "list1", 326 "partialname": "list1",
327 "quadding": 0, 327 "quadding": 0,
328 - "value": "six" 328 + "value": "u:six"
329 }, 329 },
330 { 330 {
331 "alternativename": "drop1", 331 "alternativename": "drop1",
@@ -340,7 +340,7 @@ @@ -340,7 +340,7 @@
340 "elephant", 340 "elephant",
341 "twelve" 341 "twelve"
342 ], 342 ],
343 - "defaultvalue": "", 343 + "defaultvalue": "u:",
344 "fieldflags": 131072, 344 "fieldflags": 131072,
345 "fieldtype": "/Ch", 345 "fieldtype": "/Ch",
346 "fullname": "drop1", 346 "fullname": "drop1",
@@ -354,7 +354,7 @@ @@ -354,7 +354,7 @@
354 "parent": null, 354 "parent": null,
355 "partialname": "drop1", 355 "partialname": "drop1",
356 "quadding": 0, 356 "quadding": 0,
357 - "value": "elephant" 357 + "value": "u:elephant"
358 }, 358 },
359 { 359 {
360 "alternativename": "combodrop1", 360 "alternativename": "combodrop1",
@@ -369,7 +369,7 @@ @@ -369,7 +369,7 @@
369 "gamma", 369 "gamma",
370 "delta" 370 "delta"
371 ], 371 ],
372 - "defaultvalue": "", 372 + "defaultvalue": "u:",
373 "fieldflags": 393216, 373 "fieldflags": 393216,
374 "fieldtype": "/Ch", 374 "fieldtype": "/Ch",
375 "fullname": "combodrop1", 375 "fullname": "combodrop1",
@@ -383,7 +383,7 @@ @@ -383,7 +383,7 @@
383 "parent": null, 383 "parent": null,
384 "partialname": "combodrop1", 384 "partialname": "combodrop1",
385 "quadding": 0, 385 "quadding": 0,
386 - "value": "delta" 386 + "value": "u:delta"
387 } 387 }
388 ], 388 ],
389 "hasacroform": true, 389 "hasacroform": true,
qpdf/qtest/qpdf/json-outlines-with-actions-v2.out
@@ -441,8 +441,8 @@ @@ -441,8 +441,8 @@
441 "capabilities": { 441 "capabilities": {
442 "accessibility": true, 442 "accessibility": true,
443 "extract": true, 443 "extract": true,
444 - "moddifyannotations": true,  
445 "modify": true, 444 "modify": true,
  445 + "modifyannotations": true,
446 "modifyassembly": true, 446 "modifyassembly": true,
447 "modifyforms": true, 447 "modifyforms": true,
448 "modifyother": true, 448 "modifyother": true,
@@ -694,7 +694,7 @@ @@ -694,7 +694,7 @@
694 "/Last": "37 0 R", 694 "/Last": "37 0 R",
695 "/Next": "5 0 R", 695 "/Next": "5 0 R",
696 "/Parent": "2 0 R", 696 "/Parent": "2 0 R",
697 - "/Title": "Potato 1 -> 5: /XYZ null null null", 697 + "/Title": "u:Potato 1 -> 5: /XYZ null null null",
698 "/Type": "/Outline" 698 "/Type": "/Outline"
699 } 699 }
700 }, 700 },
@@ -709,7 +709,7 @@ @@ -709,7 +709,7 @@
709 ], 709 ],
710 "/Parent": "2 0 R", 710 "/Parent": "2 0 R",
711 "/Prev": "4 0 R", 711 "/Prev": "4 0 R",
712 - "/Title": "Salad 2 -> 15: /XYZ 66 756 3", 712 + "/Title": "u:Salad 2 -> 15: /XYZ 66 756 3",
713 "/Type": "/Outline" 713 "/Type": "/Outline"
714 } 714 }
715 }, 715 },
@@ -1294,7 +1294,7 @@ @@ -1294,7 +1294,7 @@
1294 "/Last": "101 0 R", 1294 "/Last": "101 0 R",
1295 "/Next": "37 0 R", 1295 "/Next": "37 0 R",
1296 "/Parent": "4 0 R", 1296 "/Parent": "4 0 R",
1297 - "/Title": "Mern 1.1 -> 11: /Fit", 1297 + "/Title": "u:Mern 1.1 -> 11: /Fit",
1298 "/Type": "/Outline" 1298 "/Type": "/Outline"
1299 } 1299 }
1300 }, 1300 },
@@ -1310,7 +1310,7 @@ @@ -1310,7 +1310,7 @@
1310 "/Last": "103 0 R", 1310 "/Last": "103 0 R",
1311 "/Parent": "4 0 R", 1311 "/Parent": "4 0 R",
1312 "/Prev": "36 0 R", 1312 "/Prev": "36 0 R",
1313 - "/Title": "Squash ÷πʬ÷ 1.2 -> 13: /FitH 792", 1313 + "/Title": "u:Squash ÷πʬ÷ 1.2 -> 13: /FitH 792",
1314 "/Type": "/Outline" 1314 "/Type": "/Outline"
1315 } 1315 }
1316 }, 1316 },
@@ -1641,7 +1641,7 @@ @@ -1641,7 +1641,7 @@
1641 "/Last": "105 0 R", 1641 "/Last": "105 0 R",
1642 "/Next": "101 0 R", 1642 "/Next": "101 0 R",
1643 "/Parent": "36 0 R", 1643 "/Parent": "36 0 R",
1644 - "/Title": "Biherbadem 1.1.1 -> 12: /FitV 100", 1644 + "/Title": "u:Biherbadem 1.1.1 -> 12: /FitV 100",
1645 "/Type": "/Outline" 1645 "/Type": "/Outline"
1646 } 1646 }
1647 }, 1647 },
@@ -1659,16 +1659,16 @@ @@ -1659,16 +1659,16 @@
1659 "/Last": "106 0 R", 1659 "/Last": "106 0 R",
1660 "/Parent": "36 0 R", 1660 "/Parent": "36 0 R",
1661 "/Prev": "100 0 R", 1661 "/Prev": "100 0 R",
1662 - "/Title": "Gawehwehweh 1.1.2 -> 12: /XYZ null null null", 1662 + "/Title": "u:Gawehwehweh 1.1.2 -> 12: /XYZ null null null",
1663 "/Type": "/Outline" 1663 "/Type": "/Outline"
1664 } 1664 }
1665 }, 1665 },
1666 "obj:102 0 R": { 1666 "obj:102 0 R": {
1667 "value": { 1667 "value": {
1668 - "/Dest": "gabeebee", 1668 + "/Dest": "u:gabeebee",
1669 "/Next": "103 0 R", 1669 "/Next": "103 0 R",
1670 "/Parent": "37 0 R", 1670 "/Parent": "37 0 R",
1671 - "/Title": "Gabeebeebee (name) 1.2.1 -> 1: /FitR 66 714 180 770", 1671 + "/Title": "u:Gabeebeebee (name) 1.2.1 -> 1: /FitR 66 714 180 770",
1672 "/Type": "/Outline" 1672 "/Type": "/Outline"
1673 } 1673 }
1674 }, 1674 },
@@ -1687,20 +1687,20 @@ @@ -1687,20 +1687,20 @@
1687 }, 1687 },
1688 "/Parent": "37 0 R", 1688 "/Parent": "37 0 R",
1689 "/Prev": "102 0 R", 1689 "/Prev": "102 0 R",
1690 - "/Title": "Merschqaberschq (A) 1.2.2 -> 0: /XYZ null null null", 1690 + "/Title": "u:Merschqaberschq (A) 1.2.2 -> 0: /XYZ null null null",
1691 "/Type": "/Outline" 1691 "/Type": "/Outline"
1692 } 1692 }
1693 }, 1693 },
1694 "obj:104 0 R": { 1694 "obj:104 0 R": {
1695 "value": { 1695 "value": {
1696 "/A": { 1696 "/A": {
1697 - "/D": "glarp", 1697 + "/D": "u:glarp",
1698 "/S": "/GoTo", 1698 "/S": "/GoTo",
1699 "/Type": "/Action" 1699 "/Type": "/Action"
1700 }, 1700 },
1701 "/Next": "105 0 R", 1701 "/Next": "105 0 R",
1702 "/Parent": "100 0 R", 1702 "/Parent": "100 0 R",
1703 - "/Title": "Glarpenspliel (A, name) 1.1.1.1 -> 18: /XYZ null null null", 1703 + "/Title": "u:Glarpenspliel (A, name) 1.1.1.1 -> 18: /XYZ null null null",
1704 "/Type": "/Outline" 1704 "/Type": "/Outline"
1705 } 1705 }
1706 }, 1706 },
@@ -1715,7 +1715,7 @@ @@ -1715,7 +1715,7 @@
1715 ], 1715 ],
1716 "/Parent": "100 0 R", 1716 "/Parent": "100 0 R",
1717 "/Prev": "104 0 R", 1717 "/Prev": "104 0 R",
1718 - "/Title": "Hagoogamagoogle 1.1.1.2 -> 19: /XYZ null null null", 1718 + "/Title": "u:Hagoogamagoogle 1.1.1.2 -> 19: /XYZ null null null",
1719 "/Type": "/Outline" 1719 "/Type": "/Outline"
1720 } 1720 }
1721 }, 1721 },
@@ -1723,14 +1723,14 @@ @@ -1723,14 +1723,14 @@
1723 "value": { 1723 "value": {
1724 "/Dest": "108 0 R", 1724 "/Dest": "108 0 R",
1725 "/Parent": "101 0 R", 1725 "/Parent": "101 0 R",
1726 - "/Title": "Jawarnianbvarwash 1.1.2.1 -> 22: /XYZ null null null", 1726 + "/Title": "u:Jawarnianbvarwash 1.1.2.1 -> 22: /XYZ null null null",
1727 "/Type": "/Outline" 1727 "/Type": "/Outline"
1728 } 1728 }
1729 }, 1729 },
1730 "obj:107 0 R": { 1730 "obj:107 0 R": {
1731 "value": { 1731 "value": {
1732 "/Names": [ 1732 "/Names": [
1733 - "gabeebee", 1733 + "u:gabeebee",
1734 [ 1734 [
1735 "7 0 R", 1735 "7 0 R",
1736 "/FitR", 1736 "/FitR",
@@ -1739,7 +1739,7 @@ @@ -1739,7 +1739,7 @@
1739 180, 1739 180,
1740 770 1740 770
1741 ], 1741 ],
1742 - "glarp", 1742 + "u:glarp",
1743 [ 1743 [
1744 "24 0 R", 1744 "24 0 R",
1745 "/XYZ", 1745 "/XYZ",
@@ -1762,8 +1762,8 @@ @@ -1762,8 +1762,8 @@
1762 "trailer": { 1762 "trailer": {
1763 "value": { 1763 "value": {
1764 "/ID": [ 1764 "/ID": [
1765 - "Õ+\f\u0017Â\u0016Pib®gC¯ì&\u000f",  
1766 - "Õ+\f\u0017Â\u0016Pib®gC¯ì&\u000f" 1765 + "b:d52b0c17c216506962ae6743afec260f",
  1766 + "b:d52b0c17c216506962ae6743afec260f"
1767 ], 1767 ],
1768 "/Root": "1 0 R", 1768 "/Root": "1 0 R",
1769 "/Size": 109 1769 "/Size": 109
qpdf/qtest/qpdf/json-outlines-with-old-root-dests-v2.out
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 ], 10 ],
11 "images": [], 11 "images": [],
12 "label": { 12 "label": {
13 - "/P": "0", 13 + "/P": "u:0",
14 "/St": 1 14 "/St": 1
15 }, 15 },
16 "object": "6 0 R", 16 "object": "6 0 R",
@@ -524,7 +524,7 @@ @@ -524,7 +524,7 @@
524 { 524 {
525 "index": 0, 525 "index": 0,
526 "label": { 526 "label": {
527 - "/P": "0", 527 + "/P": "u:0",
528 "/St": 1 528 "/St": 1
529 } 529 }
530 }, 530 },
@@ -546,8 +546,8 @@ @@ -546,8 +546,8 @@
546 "capabilities": { 546 "capabilities": {
547 "accessibility": true, 547 "accessibility": true,
548 "extract": true, 548 "extract": true,
549 - "moddifyannotations": true,  
550 "modify": true, 549 "modify": true,
  550 + "modifyannotations": true,
551 "modifyassembly": true, 551 "modifyassembly": true,
552 "modifyforms": true, 552 "modifyforms": true,
553 "modifyother": true, 553 "modifyother": true,
@@ -736,7 +736,7 @@ @@ -736,7 +736,7 @@
736 "/Nums": [ 736 "/Nums": [
737 0, 737 0,
738 { 738 {
739 - "/P": "0" 739 + "/P": "u:0"
740 }, 740 },
741 1, 741 1,
742 { 742 {
@@ -809,7 +809,7 @@ @@ -809,7 +809,7 @@
809 "/Last": "37 0 R", 809 "/Last": "37 0 R",
810 "/Next": "5 0 R", 810 "/Next": "5 0 R",
811 "/Parent": "2 0 R", 811 "/Parent": "2 0 R",
812 - "/Title": "•Potato 1 -> 5: /XYZ null null null", 812 + "/Title": "u:•Potato 1 -> 5: /XYZ null null null",
813 "/Type": "/Outline" 813 "/Type": "/Outline"
814 } 814 }
815 }, 815 },
@@ -824,7 +824,7 @@ @@ -824,7 +824,7 @@
824 ], 824 ],
825 "/Parent": "2 0 R", 825 "/Parent": "2 0 R",
826 "/Prev": "4 0 R", 826 "/Prev": "4 0 R",
827 - "/Title": "•Salad 2 -> 15: /XYZ 66 756 3", 827 + "/Title": "u:•Salad 2 -> 15: /XYZ 66 756 3",
828 "/Type": "/Outline" 828 "/Type": "/Outline"
829 } 829 }
830 }, 830 },
@@ -1409,7 +1409,7 @@ @@ -1409,7 +1409,7 @@
1409 "/Last": "101 0 R", 1409 "/Last": "101 0 R",
1410 "/Next": "37 0 R", 1410 "/Next": "37 0 R",
1411 "/Parent": "4 0 R", 1411 "/Parent": "4 0 R",
1412 - "/Title": "•Mern 1.1 -> 11: /Fit", 1412 + "/Title": "u:•Mern 1.1 -> 11: /Fit",
1413 "/Type": "/Outline" 1413 "/Type": "/Outline"
1414 } 1414 }
1415 }, 1415 },
@@ -1425,7 +1425,7 @@ @@ -1425,7 +1425,7 @@
1425 "/Last": "103 0 R", 1425 "/Last": "103 0 R",
1426 "/Parent": "4 0 R", 1426 "/Parent": "4 0 R",
1427 "/Prev": "36 0 R", 1427 "/Prev": "36 0 R",
1428 - "/Title": "•Squash ÷πʬ÷ 1.2 -> 13: /FitH 792", 1428 + "/Title": "u:•Squash ÷πʬ÷ 1.2 -> 13: /FitH 792",
1429 "/Type": "/Outline" 1429 "/Type": "/Outline"
1430 } 1430 }
1431 }, 1431 },
@@ -1756,7 +1756,7 @@ @@ -1756,7 +1756,7 @@
1756 "/Last": "105 0 R", 1756 "/Last": "105 0 R",
1757 "/Next": "101 0 R", 1757 "/Next": "101 0 R",
1758 "/Parent": "36 0 R", 1758 "/Parent": "36 0 R",
1759 - "/Title": "•Biherbadem 1.1.1 -> 12: /FitV 100", 1759 + "/Title": "u:•Biherbadem 1.1.1 -> 12: /FitV 100",
1760 "/Type": "/Outline" 1760 "/Type": "/Outline"
1761 } 1761 }
1762 }, 1762 },
@@ -1774,7 +1774,7 @@ @@ -1774,7 +1774,7 @@
1774 "/Last": "106 0 R", 1774 "/Last": "106 0 R",
1775 "/Parent": "36 0 R", 1775 "/Parent": "36 0 R",
1776 "/Prev": "100 0 R", 1776 "/Prev": "100 0 R",
1777 - "/Title": "•Gawehwehweh 1.1.2 -> 12: /XYZ null null null", 1777 + "/Title": "u:•Gawehwehweh 1.1.2 -> 12: /XYZ null null null",
1778 "/Type": "/Outline" 1778 "/Type": "/Outline"
1779 } 1779 }
1780 }, 1780 },
@@ -1783,7 +1783,7 @@ @@ -1783,7 +1783,7 @@
1783 "/Dest": "/gabeebee", 1783 "/Dest": "/gabeebee",
1784 "/Next": "103 0 R", 1784 "/Next": "103 0 R",
1785 "/Parent": "37 0 R", 1785 "/Parent": "37 0 R",
1786 - "/Title": "•Gabeebeebee (name) 1.2.1 -> 1: /FitR 66 714 180 770", 1786 + "/Title": "u:•Gabeebeebee (name) 1.2.1 -> 1: /FitR 66 714 180 770",
1787 "/Type": "/Outline" 1787 "/Type": "/Outline"
1788 } 1788 }
1789 }, 1789 },
@@ -1802,7 +1802,7 @@ @@ -1802,7 +1802,7 @@
1802 }, 1802 },
1803 "/Parent": "37 0 R", 1803 "/Parent": "37 0 R",
1804 "/Prev": "102 0 R", 1804 "/Prev": "102 0 R",
1805 - "/Title": "•Merschqaberschq (A) 1.2.2 -> 0: /XYZ null null null", 1805 + "/Title": "u:•Merschqaberschq (A) 1.2.2 -> 0: /XYZ null null null",
1806 "/Type": "/Outline" 1806 "/Type": "/Outline"
1807 } 1807 }
1808 }, 1808 },
@@ -1815,7 +1815,7 @@ @@ -1815,7 +1815,7 @@
1815 }, 1815 },
1816 "/Next": "105 0 R", 1816 "/Next": "105 0 R",
1817 "/Parent": "100 0 R", 1817 "/Parent": "100 0 R",
1818 - "/Title": "•Glarpenspliel (A, name) 1.1.1.1 -> 18: /XYZ null null null", 1818 + "/Title": "u:•Glarpenspliel (A, name) 1.1.1.1 -> 18: /XYZ null null null",
1819 "/Type": "/Outline" 1819 "/Type": "/Outline"
1820 } 1820 }
1821 }, 1821 },
@@ -1830,7 +1830,7 @@ @@ -1830,7 +1830,7 @@
1830 ], 1830 ],
1831 "/Parent": "100 0 R", 1831 "/Parent": "100 0 R",
1832 "/Prev": "104 0 R", 1832 "/Prev": "104 0 R",
1833 - "/Title": "•Hagoogamagoogle 1.1.1.2 -> 19: /XYZ null null null", 1833 + "/Title": "u:•Hagoogamagoogle 1.1.1.2 -> 19: /XYZ null null null",
1834 "/Type": "/Outline" 1834 "/Type": "/Outline"
1835 } 1835 }
1836 }, 1836 },
@@ -1844,7 +1844,7 @@ @@ -1844,7 +1844,7 @@
1844 null 1844 null
1845 ], 1845 ],
1846 "/Parent": "101 0 R", 1846 "/Parent": "101 0 R",
1847 - "/Title": "•Jawarnianbvarwash 1.1.2.1 -> 22: /XYZ null null null", 1847 + "/Title": "u:•Jawarnianbvarwash 1.1.2.1 -> 22: /XYZ null null null",
1848 "/Type": "/Outline" 1848 "/Type": "/Outline"
1849 } 1849 }
1850 }, 1850 },
@@ -1870,8 +1870,8 @@ @@ -1870,8 +1870,8 @@
1870 "trailer": { 1870 "trailer": {
1871 "value": { 1871 "value": {
1872 "/ID": [ 1872 "/ID": [
1873 - "Õ+\f\u0017Â\u0016Pib®gC¯ì&\u000f",  
1874 - "Õ+\f\u0017Â\u0016Pib®gC¯ì&\u000f" 1873 + "b:d52b0c17c216506962ae6743afec260f",
  1874 + "b:d52b0c17c216506962ae6743afec260f"
1875 ], 1875 ],
1876 "/Root": "1 0 R", 1876 "/Root": "1 0 R",
1877 "/Size": 108 1877 "/Size": 108
qpdf/qtest/qpdf/json-page-labels-and-outlines-outlines-pages-v2.out
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 ], 10 ],
11 "images": [], 11 "images": [],
12 "label": { 12 "label": {
13 - "/P": "", 13 + "/P": "u:",
14 "/St": 1 14 "/St": 1
15 }, 15 },
16 "object": "3 0 R", 16 "object": "3 0 R",
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 ], 35 ],
36 "images": [], 36 "images": [],
37 "label": { 37 "label": {
38 - "/P": "", 38 + "/P": "u:",
39 "/St": 2 39 "/St": 2
40 }, 40 },
41 "object": "4 0 R", 41 "object": "4 0 R",
@@ -138,7 +138,7 @@ @@ -138,7 +138,7 @@
138 ], 138 ],
139 "images": [], 139 "images": [],
140 "label": { 140 "label": {
141 - "/P": "", 141 + "/P": "u:",
142 "/St": 1 142 "/St": 1
143 }, 143 },
144 "object": "10 0 R", 144 "object": "10 0 R",
@@ -151,7 +151,7 @@ @@ -151,7 +151,7 @@
151 ], 151 ],
152 "images": [], 152 "images": [],
153 "label": { 153 "label": {
154 - "/P": "", 154 + "/P": "u:",
155 "/St": 2 155 "/St": 2
156 }, 156 },
157 "object": "11 0 R", 157 "object": "11 0 R",
@@ -190,7 +190,7 @@ @@ -190,7 +190,7 @@
190 ], 190 ],
191 "images": [], 191 "images": [],
192 "label": { 192 "label": {
193 - "/P": "", 193 + "/P": "u:",
194 "/St": 1 194 "/St": 1
195 }, 195 },
196 "object": "14 0 R", 196 "object": "14 0 R",
@@ -358,7 +358,7 @@ @@ -358,7 +358,7 @@
358 ], 358 ],
359 "images": [], 359 "images": [],
360 "label": { 360 "label": {
361 - "/P": "", 361 + "/P": "u:",
362 "/St": 1 362 "/St": 1
363 }, 363 },
364 "object": "22 0 R", 364 "object": "22 0 R",
qpdf/qtest/qpdf/json-page-labels-and-outlines-pagelabels-v2.out
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 { 7 {
8 "index": 0, 8 "index": 0,
9 "label": { 9 "label": {
10 - "/P": "", 10 + "/P": "u:",
11 "/St": 1 11 "/St": 1
12 } 12 }
13 }, 13 },
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 { 21 {
22 "index": 7, 22 "index": 7,
23 "label": { 23 "label": {
24 - "/P": "", 24 + "/P": "u:",
25 "/St": 1 25 "/St": 1
26 } 26 }
27 }, 27 },
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 { 35 {
36 "index": 11, 36 "index": 11,
37 "label": { 37 "label": {
38 - "/P": "", 38 + "/P": "u:",
39 "/St": 1 39 "/St": 1
40 } 40 }
41 }, 41 },
@@ -56,7 +56,7 @@ @@ -56,7 +56,7 @@
56 { 56 {
57 "index": 19, 57 "index": 19,
58 "label": { 58 "label": {
59 - "/P": "", 59 + "/P": "u:",
60 "/St": 1 60 "/St": 1
61 } 61 }
62 }, 62 },
qpdf/qtest/qpdf/json-page-labels-and-outlines-pages-v2.out
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 ], 10 ],
11 "images": [], 11 "images": [],
12 "label": { 12 "label": {
13 - "/P": "", 13 + "/P": "u:",
14 "/St": 1 14 "/St": 1
15 }, 15 },
16 "object": "3 0 R", 16 "object": "3 0 R",
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 ], 35 ],
36 "images": [], 36 "images": [],
37 "label": { 37 "label": {
38 - "/P": "", 38 + "/P": "u:",
39 "/St": 2 39 "/St": 2
40 }, 40 },
41 "object": "4 0 R", 41 "object": "4 0 R",
@@ -138,7 +138,7 @@ @@ -138,7 +138,7 @@
138 ], 138 ],
139 "images": [], 139 "images": [],
140 "label": { 140 "label": {
141 - "/P": "", 141 + "/P": "u:",
142 "/St": 1 142 "/St": 1
143 }, 143 },
144 "object": "10 0 R", 144 "object": "10 0 R",
@@ -151,7 +151,7 @@ @@ -151,7 +151,7 @@
151 ], 151 ],
152 "images": [], 152 "images": [],
153 "label": { 153 "label": {
154 - "/P": "", 154 + "/P": "u:",
155 "/St": 2 155 "/St": 2
156 }, 156 },
157 "object": "11 0 R", 157 "object": "11 0 R",
@@ -190,7 +190,7 @@ @@ -190,7 +190,7 @@
190 ], 190 ],
191 "images": [], 191 "images": [],
192 "label": { 192 "label": {
193 - "/P": "", 193 + "/P": "u:",
194 "/St": 1 194 "/St": 1
195 }, 195 },
196 "object": "14 0 R", 196 "object": "14 0 R",
@@ -358,7 +358,7 @@ @@ -358,7 +358,7 @@
358 ], 358 ],
359 "images": [], 359 "images": [],
360 "label": { 360 "label": {
361 - "/P": "", 361 + "/P": "u:",
362 "/St": 1 362 "/St": 1
363 }, 363 },
364 "object": "22 0 R", 364 "object": "22 0 R",
qpdf/qtest/qpdf/json-page-labels-and-outlines-qpdf-v2.out
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 "/Nums": [ 14 "/Nums": [
15 0, 15 0,
16 { 16 {
17 - "/P": "" 17 + "/P": "u:"
18 }, 18 },
19 2, 19 2,
20 { 20 {
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 }, 23 },
24 7, 24 7,
25 { 25 {
26 - "/P": "" 26 + "/P": "u:"
27 }, 27 },
28 9, 28 9,
29 { 29 {
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 }, 32 },
33 11, 33 11,
34 { 34 {
35 - "/P": "" 35 + "/P": "u:"
36 }, 36 },
37 12, 37 12,
38 { 38 {
@@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
46 }, 46 },
47 19, 47 19,
48 { 48 {
49 - "/P": "" 49 + "/P": "u:"
50 }, 50 },
51 20, 51 20,
52 { 52 {
@@ -684,8 +684,10 @@ @@ -684,8 +684,10 @@
684 } 684 }
685 }, 685 },
686 "obj:33 0 R": { 686 "obj:33 0 R": {
687 - "value": {  
688 - "/Length": "34 0 R" 687 + "stream": {
  688 + "dict": {
  689 + "/Length": "34 0 R"
  690 + }
689 } 691 }
690 }, 692 },
691 "obj:34 0 R": { 693 "obj:34 0 R": {
@@ -707,232 +709,290 @@ @@ -707,232 +709,290 @@
707 ] 709 ]
708 }, 710 },
709 "obj:37 0 R": { 711 "obj:37 0 R": {
710 - "value": {  
711 - "/Length": "38 0 R" 712 + "stream": {
  713 + "dict": {
  714 + "/Length": "38 0 R"
  715 + }
712 } 716 }
713 }, 717 },
714 "obj:38 0 R": { 718 "obj:38 0 R": {
715 "value": 46 719 "value": 46
716 }, 720 },
717 "obj:39 0 R": { 721 "obj:39 0 R": {
718 - "value": {  
719 - "/Length": "40 0 R" 722 + "stream": {
  723 + "dict": {
  724 + "/Length": "40 0 R"
  725 + }
720 } 726 }
721 }, 727 },
722 "obj:40 0 R": { 728 "obj:40 0 R": {
723 "value": 46 729 "value": 46
724 }, 730 },
725 "obj:41 0 R": { 731 "obj:41 0 R": {
726 - "value": {  
727 - "/Length": "42 0 R" 732 + "stream": {
  733 + "dict": {
  734 + "/Length": "42 0 R"
  735 + }
728 } 736 }
729 }, 737 },
730 "obj:42 0 R": { 738 "obj:42 0 R": {
731 "value": 46 739 "value": 46
732 }, 740 },
733 "obj:43 0 R": { 741 "obj:43 0 R": {
734 - "value": {  
735 - "/Length": "44 0 R" 742 + "stream": {
  743 + "dict": {
  744 + "/Length": "44 0 R"
  745 + }
736 } 746 }
737 }, 747 },
738 "obj:44 0 R": { 748 "obj:44 0 R": {
739 "value": 46 749 "value": 46
740 }, 750 },
741 "obj:45 0 R": { 751 "obj:45 0 R": {
742 - "value": {  
743 - "/Length": "46 0 R" 752 + "stream": {
  753 + "dict": {
  754 + "/Length": "46 0 R"
  755 + }
744 } 756 }
745 }, 757 },
746 "obj:46 0 R": { 758 "obj:46 0 R": {
747 "value": 46 759 "value": 46
748 }, 760 },
749 "obj:47 0 R": { 761 "obj:47 0 R": {
750 - "value": {  
751 - "/Length": "48 0 R" 762 + "stream": {
  763 + "dict": {
  764 + "/Length": "48 0 R"
  765 + }
752 } 766 }
753 }, 767 },
754 "obj:48 0 R": { 768 "obj:48 0 R": {
755 "value": 46 769 "value": 46
756 }, 770 },
757 "obj:49 0 R": { 771 "obj:49 0 R": {
758 - "value": {  
759 - "/Length": "50 0 R" 772 + "stream": {
  773 + "dict": {
  774 + "/Length": "50 0 R"
  775 + }
760 } 776 }
761 }, 777 },
762 "obj:50 0 R": { 778 "obj:50 0 R": {
763 "value": 46 779 "value": 46
764 }, 780 },
765 "obj:51 0 R": { 781 "obj:51 0 R": {
766 - "value": {  
767 - "/Length": "52 0 R" 782 + "stream": {
  783 + "dict": {
  784 + "/Length": "52 0 R"
  785 + }
768 } 786 }
769 }, 787 },
770 "obj:52 0 R": { 788 "obj:52 0 R": {
771 "value": 46 789 "value": 46
772 }, 790 },
773 "obj:53 0 R": { 791 "obj:53 0 R": {
774 - "value": {  
775 - "/Length": "54 0 R" 792 + "stream": {
  793 + "dict": {
  794 + "/Length": "54 0 R"
  795 + }
776 } 796 }
777 }, 797 },
778 "obj:54 0 R": { 798 "obj:54 0 R": {
779 "value": 46 799 "value": 46
780 }, 800 },
781 "obj:55 0 R": { 801 "obj:55 0 R": {
782 - "value": {  
783 - "/Length": "56 0 R" 802 + "stream": {
  803 + "dict": {
  804 + "/Length": "56 0 R"
  805 + }
784 } 806 }
785 }, 807 },
786 "obj:56 0 R": { 808 "obj:56 0 R": {
787 "value": 47 809 "value": 47
788 }, 810 },
789 "obj:57 0 R": { 811 "obj:57 0 R": {
790 - "value": {  
791 - "/Length": "58 0 R" 812 + "stream": {
  813 + "dict": {
  814 + "/Length": "58 0 R"
  815 + }
792 } 816 }
793 }, 817 },
794 "obj:58 0 R": { 818 "obj:58 0 R": {
795 "value": 47 819 "value": 47
796 }, 820 },
797 "obj:59 0 R": { 821 "obj:59 0 R": {
798 - "value": {  
799 - "/Length": "60 0 R" 822 + "stream": {
  823 + "dict": {
  824 + "/Length": "60 0 R"
  825 + }
800 } 826 }
801 }, 827 },
802 "obj:60 0 R": { 828 "obj:60 0 R": {
803 "value": 47 829 "value": 47
804 }, 830 },
805 "obj:61 0 R": { 831 "obj:61 0 R": {
806 - "value": {  
807 - "/Length": "62 0 R" 832 + "stream": {
  833 + "dict": {
  834 + "/Length": "62 0 R"
  835 + }
808 } 836 }
809 }, 837 },
810 "obj:62 0 R": { 838 "obj:62 0 R": {
811 "value": 47 839 "value": 47
812 }, 840 },
813 "obj:63 0 R": { 841 "obj:63 0 R": {
814 - "value": {  
815 - "/Length": "64 0 R" 842 + "stream": {
  843 + "dict": {
  844 + "/Length": "64 0 R"
  845 + }
816 } 846 }
817 }, 847 },
818 "obj:64 0 R": { 848 "obj:64 0 R": {
819 "value": 47 849 "value": 47
820 }, 850 },
821 "obj:65 0 R": { 851 "obj:65 0 R": {
822 - "value": {  
823 - "/Length": "66 0 R" 852 + "stream": {
  853 + "dict": {
  854 + "/Length": "66 0 R"
  855 + }
824 } 856 }
825 }, 857 },
826 "obj:66 0 R": { 858 "obj:66 0 R": {
827 "value": 47 859 "value": 47
828 }, 860 },
829 "obj:67 0 R": { 861 "obj:67 0 R": {
830 - "value": {  
831 - "/Length": "68 0 R" 862 + "stream": {
  863 + "dict": {
  864 + "/Length": "68 0 R"
  865 + }
832 } 866 }
833 }, 867 },
834 "obj:68 0 R": { 868 "obj:68 0 R": {
835 "value": 47 869 "value": 47
836 }, 870 },
837 "obj:69 0 R": { 871 "obj:69 0 R": {
838 - "value": {  
839 - "/Length": "70 0 R" 872 + "stream": {
  873 + "dict": {
  874 + "/Length": "70 0 R"
  875 + }
840 } 876 }
841 }, 877 },
842 "obj:70 0 R": { 878 "obj:70 0 R": {
843 "value": 47 879 "value": 47
844 }, 880 },
845 "obj:71 0 R": { 881 "obj:71 0 R": {
846 - "value": {  
847 - "/Length": "72 0 R" 882 + "stream": {
  883 + "dict": {
  884 + "/Length": "72 0 R"
  885 + }
848 } 886 }
849 }, 887 },
850 "obj:72 0 R": { 888 "obj:72 0 R": {
851 "value": 47 889 "value": 47
852 }, 890 },
853 "obj:73 0 R": { 891 "obj:73 0 R": {
854 - "value": {  
855 - "/Length": "74 0 R" 892 + "stream": {
  893 + "dict": {
  894 + "/Length": "74 0 R"
  895 + }
856 } 896 }
857 }, 897 },
858 "obj:74 0 R": { 898 "obj:74 0 R": {
859 "value": 47 899 "value": 47
860 }, 900 },
861 "obj:75 0 R": { 901 "obj:75 0 R": {
862 - "value": {  
863 - "/Length": "76 0 R" 902 + "stream": {
  903 + "dict": {
  904 + "/Length": "76 0 R"
  905 + }
864 } 906 }
865 }, 907 },
866 "obj:76 0 R": { 908 "obj:76 0 R": {
867 "value": 47 909 "value": 47
868 }, 910 },
869 "obj:77 0 R": { 911 "obj:77 0 R": {
870 - "value": {  
871 - "/Length": "78 0 R" 912 + "stream": {
  913 + "dict": {
  914 + "/Length": "78 0 R"
  915 + }
872 } 916 }
873 }, 917 },
874 "obj:78 0 R": { 918 "obj:78 0 R": {
875 "value": 47 919 "value": 47
876 }, 920 },
877 "obj:79 0 R": { 921 "obj:79 0 R": {
878 - "value": {  
879 - "/Length": "80 0 R" 922 + "stream": {
  923 + "dict": {
  924 + "/Length": "80 0 R"
  925 + }
880 } 926 }
881 }, 927 },
882 "obj:80 0 R": { 928 "obj:80 0 R": {
883 "value": 47 929 "value": 47
884 }, 930 },
885 "obj:81 0 R": { 931 "obj:81 0 R": {
886 - "value": {  
887 - "/Length": "82 0 R" 932 + "stream": {
  933 + "dict": {
  934 + "/Length": "82 0 R"
  935 + }
888 } 936 }
889 }, 937 },
890 "obj:82 0 R": { 938 "obj:82 0 R": {
891 "value": 47 939 "value": 47
892 }, 940 },
893 "obj:83 0 R": { 941 "obj:83 0 R": {
894 - "value": {  
895 - "/Length": "84 0 R" 942 + "stream": {
  943 + "dict": {
  944 + "/Length": "84 0 R"
  945 + }
896 } 946 }
897 }, 947 },
898 "obj:84 0 R": { 948 "obj:84 0 R": {
899 "value": 47 949 "value": 47
900 }, 950 },
901 "obj:85 0 R": { 951 "obj:85 0 R": {
902 - "value": {  
903 - "/Length": "86 0 R" 952 + "stream": {
  953 + "dict": {
  954 + "/Length": "86 0 R"
  955 + }
904 } 956 }
905 }, 957 },
906 "obj:86 0 R": { 958 "obj:86 0 R": {
907 "value": 47 959 "value": 47
908 }, 960 },
909 "obj:87 0 R": { 961 "obj:87 0 R": {
910 - "value": {  
911 - "/Length": "88 0 R" 962 + "stream": {
  963 + "dict": {
  964 + "/Length": "88 0 R"
  965 + }
912 } 966 }
913 }, 967 },
914 "obj:88 0 R": { 968 "obj:88 0 R": {
915 "value": 47 969 "value": 47
916 }, 970 },
917 "obj:89 0 R": { 971 "obj:89 0 R": {
918 - "value": {  
919 - "/Length": "90 0 R" 972 + "stream": {
  973 + "dict": {
  974 + "/Length": "90 0 R"
  975 + }
920 } 976 }
921 }, 977 },
922 "obj:90 0 R": { 978 "obj:90 0 R": {
923 "value": 47 979 "value": 47
924 }, 980 },
925 "obj:91 0 R": { 981 "obj:91 0 R": {
926 - "value": {  
927 - "/Length": "92 0 R" 982 + "stream": {
  983 + "dict": {
  984 + "/Length": "92 0 R"
  985 + }
928 } 986 }
929 }, 987 },
930 "obj:92 0 R": { 988 "obj:92 0 R": {
931 "value": 47 989 "value": 47
932 }, 990 },
933 "obj:93 0 R": { 991 "obj:93 0 R": {
934 - "value": {  
935 - "/Length": "94 0 R" 992 + "stream": {
  993 + "dict": {
  994 + "/Length": "94 0 R"
  995 + }
936 } 996 }
937 }, 997 },
938 "obj:94 0 R": { 998 "obj:94 0 R": {
@@ -960,7 +1020,7 @@ @@ -960,7 +1020,7 @@
960 "/Last": "99 0 R", 1020 "/Last": "99 0 R",
961 "/Next": "97 0 R", 1021 "/Next": "97 0 R",
962 "/Parent": "95 0 R", 1022 "/Parent": "95 0 R",
963 - "/Title": "Isís 1 -> 5: /XYZ null null null", 1023 + "/Title": "u:Isís 1 -> 5: /XYZ null null null",
964 "/Type": "/Outline" 1024 "/Type": "/Outline"
965 } 1025 }
966 }, 1026 },
@@ -975,7 +1035,7 @@ @@ -975,7 +1035,7 @@
975 ], 1035 ],
976 "/Parent": "95 0 R", 1036 "/Parent": "95 0 R",
977 "/Prev": "96 0 R", 1037 "/Prev": "96 0 R",
978 - "/Title": "Trepak 2 -> 15: /XYZ 66 756 3", 1038 + "/Title": "u:Trepak 2 -> 15: /XYZ 66 756 3",
979 "/Type": "/Outline" 1039 "/Type": "/Outline"
980 } 1040 }
981 }, 1041 },
@@ -990,7 +1050,7 @@ @@ -990,7 +1050,7 @@
990 "/Last": "101 0 R", 1050 "/Last": "101 0 R",
991 "/Next": "99 0 R", 1051 "/Next": "99 0 R",
992 "/Parent": "96 0 R", 1052 "/Parent": "96 0 R",
993 - "/Title": "Amanda 1.1 -> 11: /Fit", 1053 + "/Title": "u:Amanda 1.1 -> 11: /Fit",
994 "/Type": "/Outline" 1054 "/Type": "/Outline"
995 } 1055 }
996 }, 1056 },
@@ -1006,7 +1066,7 @@ @@ -1006,7 +1066,7 @@
1006 "/Last": "106 0 R", 1066 "/Last": "106 0 R",
1007 "/Parent": "96 0 R", 1067 "/Parent": "96 0 R",
1008 "/Prev": "98 0 R", 1068 "/Prev": "98 0 R",
1009 - "/Title": "Sandy ÷Σανδι÷ 1.2 -> 13: /FitH 792", 1069 + "/Title": "u:Sandy ÷Σανδι÷ 1.2 -> 13: /FitH 792",
1010 "/Type": "/Outline" 1070 "/Type": "/Outline"
1011 } 1071 }
1012 }, 1072 },
@@ -1022,7 +1082,7 @@ @@ -1022,7 +1082,7 @@
1022 "/Last": "103 0 R", 1082 "/Last": "103 0 R",
1023 "/Next": "101 0 R", 1083 "/Next": "101 0 R",
1024 "/Parent": "98 0 R", 1084 "/Parent": "98 0 R",
1025 - "/Title": "Isosicle 1.1.1 -> 12: /FitV 100", 1085 + "/Title": "u:Isosicle 1.1.1 -> 12: /FitV 100",
1026 "/Type": "/Outline" 1086 "/Type": "/Outline"
1027 } 1087 }
1028 }, 1088 },
@@ -1040,7 +1100,7 @@ @@ -1040,7 +1100,7 @@
1040 "/Last": "104 0 R", 1100 "/Last": "104 0 R",
1041 "/Parent": "98 0 R", 1101 "/Parent": "98 0 R",
1042 "/Prev": "100 0 R", 1102 "/Prev": "100 0 R",
1043 - "/Title": "Isosicle 1.1.2 -> 12: /XYZ null null null", 1103 + "/Title": "u:Isosicle 1.1.2 -> 12: /XYZ null null null",
1044 "/Type": "/Outline" 1104 "/Type": "/Outline"
1045 } 1105 }
1046 }, 1106 },
@@ -1055,7 +1115,7 @@ @@ -1055,7 +1115,7 @@
1055 ], 1115 ],
1056 "/Next": "103 0 R", 1116 "/Next": "103 0 R",
1057 "/Parent": "100 0 R", 1117 "/Parent": "100 0 R",
1058 - "/Title": "Isosicle 1.1.1.1 -> 18: /XYZ null null null", 1118 + "/Title": "u:Isosicle 1.1.1.1 -> 18: /XYZ null null null",
1059 "/Type": "/Outline" 1119 "/Type": "/Outline"
1060 } 1120 }
1061 }, 1121 },
@@ -1070,7 +1130,7 @@ @@ -1070,7 +1130,7 @@
1070 ], 1130 ],
1071 "/Parent": "100 0 R", 1131 "/Parent": "100 0 R",
1072 "/Prev": "102 0 R", 1132 "/Prev": "102 0 R",
1073 - "/Title": "Isosicle 1.1.1.2 -> 19: /XYZ null null null", 1133 + "/Title": "u:Isosicle 1.1.1.2 -> 19: /XYZ null null null",
1074 "/Type": "/Outline" 1134 "/Type": "/Outline"
1075 } 1135 }
1076 }, 1136 },
@@ -1084,7 +1144,7 @@ @@ -1084,7 +1144,7 @@
1084 null 1144 null
1085 ], 1145 ],
1086 "/Parent": "101 0 R", 1146 "/Parent": "101 0 R",
1087 - "/Title": "Isosicle 1.1.2.1 -> 22: /XYZ null null null", 1147 + "/Title": "u:Isosicle 1.1.2.1 -> 22: /XYZ null null null",
1088 "/Type": "/Outline" 1148 "/Type": "/Outline"
1089 } 1149 }
1090 }, 1150 },
@@ -1100,7 +1160,7 @@ @@ -1100,7 +1160,7 @@
1100 ], 1160 ],
1101 "/Next": "106 0 R", 1161 "/Next": "106 0 R",
1102 "/Parent": "99 0 R", 1162 "/Parent": "99 0 R",
1103 - "/Title": "Trepsichord 1.2.1 -> 1: /FitR 66 714 180 770", 1163 + "/Title": "u:Trepsichord 1.2.1 -> 1: /FitR 66 714 180 770",
1104 "/Type": "/Outline" 1164 "/Type": "/Outline"
1105 } 1165 }
1106 }, 1166 },
@@ -1115,7 +1175,7 @@ @@ -1115,7 +1175,7 @@
1115 ], 1175 ],
1116 "/Parent": "99 0 R", 1176 "/Parent": "99 0 R",
1117 "/Prev": "105 0 R", 1177 "/Prev": "105 0 R",
1118 - "/Title": "Trepsicle 1.2.2 -> 0: /XYZ null null null", 1178 + "/Title": "u:Trepsicle 1.2.2 -> 0: /XYZ null null null",
1119 "/Type": "/Outline" 1179 "/Type": "/Outline"
1120 } 1180 }
1121 }, 1181 },
qpdf/qtest/qpdf/json-page-labels-and-outlines-v2.out
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 ], 10 ],
11 "images": [], 11 "images": [],
12 "label": { 12 "label": {
13 - "/P": "", 13 + "/P": "u:",
14 "/St": 1 14 "/St": 1
15 }, 15 },
16 "object": "3 0 R", 16 "object": "3 0 R",
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 ], 35 ],
36 "images": [], 36 "images": [],
37 "label": { 37 "label": {
38 - "/P": "", 38 + "/P": "u:",
39 "/St": 2 39 "/St": 2
40 }, 40 },
41 "object": "4 0 R", 41 "object": "4 0 R",
@@ -138,7 +138,7 @@ @@ -138,7 +138,7 @@
138 ], 138 ],
139 "images": [], 139 "images": [],
140 "label": { 140 "label": {
141 - "/P": "", 141 + "/P": "u:",
142 "/St": 1 142 "/St": 1
143 }, 143 },
144 "object": "10 0 R", 144 "object": "10 0 R",
@@ -151,7 +151,7 @@ @@ -151,7 +151,7 @@
151 ], 151 ],
152 "images": [], 152 "images": [],
153 "label": { 153 "label": {
154 - "/P": "", 154 + "/P": "u:",
155 "/St": 2 155 "/St": 2
156 }, 156 },
157 "object": "11 0 R", 157 "object": "11 0 R",
@@ -190,7 +190,7 @@ @@ -190,7 +190,7 @@
190 ], 190 ],
191 "images": [], 191 "images": [],
192 "label": { 192 "label": {
193 - "/P": "", 193 + "/P": "u:",
194 "/St": 1 194 "/St": 1
195 }, 195 },
196 "object": "14 0 R", 196 "object": "14 0 R",
@@ -358,7 +358,7 @@ @@ -358,7 +358,7 @@
358 ], 358 ],
359 "images": [], 359 "images": [],
360 "label": { 360 "label": {
361 - "/P": "", 361 + "/P": "u:",
362 "/St": 1 362 "/St": 1
363 }, 363 },
364 "object": "22 0 R", 364 "object": "22 0 R",
@@ -524,7 +524,7 @@ @@ -524,7 +524,7 @@
524 { 524 {
525 "index": 0, 525 "index": 0,
526 "label": { 526 "label": {
527 - "/P": "", 527 + "/P": "u:",
528 "/St": 1 528 "/St": 1
529 } 529 }
530 }, 530 },
@@ -538,7 +538,7 @@ @@ -538,7 +538,7 @@
538 { 538 {
539 "index": 7, 539 "index": 7,
540 "label": { 540 "label": {
541 - "/P": "", 541 + "/P": "u:",
542 "/St": 1 542 "/St": 1
543 } 543 }
544 }, 544 },
@@ -552,7 +552,7 @@ @@ -552,7 +552,7 @@
552 { 552 {
553 "index": 11, 553 "index": 11,
554 "label": { 554 "label": {
555 - "/P": "", 555 + "/P": "u:",
556 "/St": 1 556 "/St": 1
557 } 557 }
558 }, 558 },
@@ -573,7 +573,7 @@ @@ -573,7 +573,7 @@
573 { 573 {
574 "index": 19, 574 "index": 19,
575 "label": { 575 "label": {
576 - "/P": "", 576 + "/P": "u:",
577 "/St": 1 577 "/St": 1
578 } 578 }
579 }, 579 },
@@ -616,8 +616,8 @@ @@ -616,8 +616,8 @@
616 "capabilities": { 616 "capabilities": {
617 "accessibility": true, 617 "accessibility": true,
618 "extract": true, 618 "extract": true,
619 - "moddifyannotations": true,  
620 "modify": true, 619 "modify": true,
  620 + "modifyannotations": true,
621 "modifyassembly": true, 621 "modifyassembly": true,
622 "modifyforms": true, 622 "modifyforms": true,
623 "modifyother": true, 623 "modifyother": true,
@@ -805,7 +805,7 @@ @@ -805,7 +805,7 @@
805 "/Nums": [ 805 "/Nums": [
806 0, 806 0,
807 { 807 {
808 - "/P": "" 808 + "/P": "u:"
809 }, 809 },
810 2, 810 2,
811 { 811 {
@@ -814,7 +814,7 @@ @@ -814,7 +814,7 @@
814 }, 814 },
815 7, 815 7,
816 { 816 {
817 - "/P": "" 817 + "/P": "u:"
818 }, 818 },
819 9, 819 9,
820 { 820 {
@@ -823,7 +823,7 @@ @@ -823,7 +823,7 @@
823 }, 823 },
824 11, 824 11,
825 { 825 {
826 - "/P": "" 826 + "/P": "u:"
827 }, 827 },
828 12, 828 12,
829 { 829 {
@@ -837,7 +837,7 @@ @@ -837,7 +837,7 @@
837 }, 837 },
838 19, 838 19,
839 { 839 {
840 - "/P": "" 840 + "/P": "u:"
841 }, 841 },
842 20, 842 20,
843 { 843 {
@@ -1811,7 +1811,7 @@ @@ -1811,7 +1811,7 @@
1811 "/Last": "99 0 R", 1811 "/Last": "99 0 R",
1812 "/Next": "97 0 R", 1812 "/Next": "97 0 R",
1813 "/Parent": "95 0 R", 1813 "/Parent": "95 0 R",
1814 - "/Title": "Isís 1 -> 5: /XYZ null null null", 1814 + "/Title": "u:Isís 1 -> 5: /XYZ null null null",
1815 "/Type": "/Outline" 1815 "/Type": "/Outline"
1816 } 1816 }
1817 }, 1817 },
@@ -1826,7 +1826,7 @@ @@ -1826,7 +1826,7 @@
1826 ], 1826 ],
1827 "/Parent": "95 0 R", 1827 "/Parent": "95 0 R",
1828 "/Prev": "96 0 R", 1828 "/Prev": "96 0 R",
1829 - "/Title": "Trepak 2 -> 15: /XYZ 66 756 3", 1829 + "/Title": "u:Trepak 2 -> 15: /XYZ 66 756 3",
1830 "/Type": "/Outline" 1830 "/Type": "/Outline"
1831 } 1831 }
1832 }, 1832 },
@@ -1841,7 +1841,7 @@ @@ -1841,7 +1841,7 @@
1841 "/Last": "101 0 R", 1841 "/Last": "101 0 R",
1842 "/Next": "99 0 R", 1842 "/Next": "99 0 R",
1843 "/Parent": "96 0 R", 1843 "/Parent": "96 0 R",
1844 - "/Title": "Amanda 1.1 -> 11: /Fit", 1844 + "/Title": "u:Amanda 1.1 -> 11: /Fit",
1845 "/Type": "/Outline" 1845 "/Type": "/Outline"
1846 } 1846 }
1847 }, 1847 },
@@ -1857,7 +1857,7 @@ @@ -1857,7 +1857,7 @@
1857 "/Last": "106 0 R", 1857 "/Last": "106 0 R",
1858 "/Parent": "96 0 R", 1858 "/Parent": "96 0 R",
1859 "/Prev": "98 0 R", 1859 "/Prev": "98 0 R",
1860 - "/Title": "Sandy ÷Σανδι÷ 1.2 -> 13: /FitH 792", 1860 + "/Title": "u:Sandy ÷Σανδι÷ 1.2 -> 13: /FitH 792",
1861 "/Type": "/Outline" 1861 "/Type": "/Outline"
1862 } 1862 }
1863 }, 1863 },
@@ -1873,7 +1873,7 @@ @@ -1873,7 +1873,7 @@
1873 "/Last": "103 0 R", 1873 "/Last": "103 0 R",
1874 "/Next": "101 0 R", 1874 "/Next": "101 0 R",
1875 "/Parent": "98 0 R", 1875 "/Parent": "98 0 R",
1876 - "/Title": "Isosicle 1.1.1 -> 12: /FitV 100", 1876 + "/Title": "u:Isosicle 1.1.1 -> 12: /FitV 100",
1877 "/Type": "/Outline" 1877 "/Type": "/Outline"
1878 } 1878 }
1879 }, 1879 },
@@ -1891,7 +1891,7 @@ @@ -1891,7 +1891,7 @@
1891 "/Last": "104 0 R", 1891 "/Last": "104 0 R",
1892 "/Parent": "98 0 R", 1892 "/Parent": "98 0 R",
1893 "/Prev": "100 0 R", 1893 "/Prev": "100 0 R",
1894 - "/Title": "Isosicle 1.1.2 -> 12: /XYZ null null null", 1894 + "/Title": "u:Isosicle 1.1.2 -> 12: /XYZ null null null",
1895 "/Type": "/Outline" 1895 "/Type": "/Outline"
1896 } 1896 }
1897 }, 1897 },
@@ -1906,7 +1906,7 @@ @@ -1906,7 +1906,7 @@
1906 ], 1906 ],
1907 "/Next": "103 0 R", 1907 "/Next": "103 0 R",
1908 "/Parent": "100 0 R", 1908 "/Parent": "100 0 R",
1909 - "/Title": "Isosicle 1.1.1.1 -> 18: /XYZ null null null", 1909 + "/Title": "u:Isosicle 1.1.1.1 -> 18: /XYZ null null null",
1910 "/Type": "/Outline" 1910 "/Type": "/Outline"
1911 } 1911 }
1912 }, 1912 },
@@ -1921,7 +1921,7 @@ @@ -1921,7 +1921,7 @@
1921 ], 1921 ],
1922 "/Parent": "100 0 R", 1922 "/Parent": "100 0 R",
1923 "/Prev": "102 0 R", 1923 "/Prev": "102 0 R",
1924 - "/Title": "Isosicle 1.1.1.2 -> 19: /XYZ null null null", 1924 + "/Title": "u:Isosicle 1.1.1.2 -> 19: /XYZ null null null",
1925 "/Type": "/Outline" 1925 "/Type": "/Outline"
1926 } 1926 }
1927 }, 1927 },
@@ -1935,7 +1935,7 @@ @@ -1935,7 +1935,7 @@
1935 null 1935 null
1936 ], 1936 ],
1937 "/Parent": "101 0 R", 1937 "/Parent": "101 0 R",
1938 - "/Title": "Isosicle 1.1.2.1 -> 22: /XYZ null null null", 1938 + "/Title": "u:Isosicle 1.1.2.1 -> 22: /XYZ null null null",
1939 "/Type": "/Outline" 1939 "/Type": "/Outline"
1940 } 1940 }
1941 }, 1941 },
@@ -1951,7 +1951,7 @@ @@ -1951,7 +1951,7 @@
1951 ], 1951 ],
1952 "/Next": "106 0 R", 1952 "/Next": "106 0 R",
1953 "/Parent": "99 0 R", 1953 "/Parent": "99 0 R",
1954 - "/Title": "Trepsichord 1.2.1 -> 1: /FitR 66 714 180 770", 1954 + "/Title": "u:Trepsichord 1.2.1 -> 1: /FitR 66 714 180 770",
1955 "/Type": "/Outline" 1955 "/Type": "/Outline"
1956 } 1956 }
1957 }, 1957 },
@@ -1966,7 +1966,7 @@ @@ -1966,7 +1966,7 @@
1966 ], 1966 ],
1967 "/Parent": "99 0 R", 1967 "/Parent": "99 0 R",
1968 "/Prev": "105 0 R", 1968 "/Prev": "105 0 R",
1969 - "/Title": "Trepsicle 1.2.2 -> 0: /XYZ null null null", 1969 + "/Title": "u:Trepsicle 1.2.2 -> 0: /XYZ null null null",
1970 "/Type": "/Outline" 1970 "/Type": "/Outline"
1971 } 1971 }
1972 }, 1972 },
qpdf/qtest/qpdf/json-page-labels-num-tree-v2.out
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
36 ], 36 ],
37 "images": [], 37 "images": [],
38 "label": { 38 "label": {
39 - "/P": "blank", 39 + "/P": "u:blank",
40 "/St": 1 40 "/St": 1
41 }, 41 },
42 "object": "8 0 R", 42 "object": "8 0 R",
@@ -49,7 +49,7 @@ @@ -49,7 +49,7 @@
49 ], 49 ],
50 "images": [], 50 "images": [],
51 "label": { 51 "label": {
52 - "/P": "X-", 52 + "/P": "u:X-",
53 "/S": "/A", 53 "/S": "/A",
54 "/St": 17 54 "/St": 17
55 }, 55 },
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
63 ], 63 ],
64 "images": [], 64 "images": [],
65 "label": { 65 "label": {
66 - "/P": "X-", 66 + "/P": "u:X-",
67 "/S": "/A", 67 "/S": "/A",
68 "/St": 18 68 "/St": 18
69 }, 69 },
@@ -77,7 +77,7 @@ @@ -77,7 +77,7 @@
77 ], 77 ],
78 "images": [], 78 "images": [],
79 "label": { 79 "label": {
80 - "/P": "", 80 + "/P": "u:",
81 "/St": 1 81 "/St": 1
82 }, 82 },
83 "object": "11 0 R", 83 "object": "11 0 R",
@@ -207,7 +207,7 @@ @@ -207,7 +207,7 @@
207 ], 207 ],
208 "images": [], 208 "images": [],
209 "label": { 209 "label": {
210 - "/P": "q.", 210 + "/P": "u:q.",
211 "/S": "/D", 211 "/S": "/D",
212 "/St": 6 212 "/St": 6
213 }, 213 },
@@ -221,7 +221,7 @@ @@ -221,7 +221,7 @@
221 ], 221 ],
222 "images": [], 222 "images": [],
223 "label": { 223 "label": {
224 - "/P": "q.", 224 + "/P": "u:q.",
225 "/S": "/D", 225 "/S": "/D",
226 "/St": 7 226 "/St": 7
227 }, 227 },
@@ -235,7 +235,7 @@ @@ -235,7 +235,7 @@
235 ], 235 ],
236 "images": [], 236 "images": [],
237 "label": { 237 "label": {
238 - "/P": "q.", 238 + "/P": "u:q.",
239 "/S": "/D", 239 "/S": "/D",
240 "/St": 8 240 "/St": 8
241 }, 241 },
@@ -249,7 +249,7 @@ @@ -249,7 +249,7 @@
249 ], 249 ],
250 "images": [], 250 "images": [],
251 "label": { 251 "label": {
252 - "/P": "q.", 252 + "/P": "u:q.",
253 "/S": "/D", 253 "/S": "/D",
254 "/St": 9 254 "/St": 9
255 }, 255 },
@@ -263,7 +263,7 @@ @@ -263,7 +263,7 @@
263 ], 263 ],
264 "images": [], 264 "images": [],
265 "label": { 265 "label": {
266 - "/P": "www", 266 + "/P": "u:www",
267 "/St": 1 267 "/St": 1
268 }, 268 },
269 "object": "25 0 R", 269 "object": "25 0 R",
@@ -412,14 +412,14 @@ @@ -412,14 +412,14 @@
412 { 412 {
413 "index": 2, 413 "index": 2,
414 "label": { 414 "label": {
415 - "/P": "blank", 415 + "/P": "u:blank",
416 "/St": 1 416 "/St": 1
417 } 417 }
418 }, 418 },
419 { 419 {
420 "index": 3, 420 "index": 3,
421 "label": { 421 "label": {
422 - "/P": "X-", 422 + "/P": "u:X-",
423 "/S": "/A", 423 "/S": "/A",
424 "/St": 17 424 "/St": 17
425 } 425 }
@@ -427,7 +427,7 @@ @@ -427,7 +427,7 @@
427 { 427 {
428 "index": 5, 428 "index": 5,
429 "label": { 429 "label": {
430 - "/P": "", 430 + "/P": "u:",
431 "/St": 1 431 "/St": 1
432 } 432 }
433 }, 433 },
@@ -462,7 +462,7 @@ @@ -462,7 +462,7 @@
462 { 462 {
463 "index": 15, 463 "index": 15,
464 "label": { 464 "label": {
465 - "/P": "q.", 465 + "/P": "u:q.",
466 "/S": "/D", 466 "/S": "/D",
467 "/St": 6 467 "/St": 6
468 } 468 }
@@ -470,7 +470,7 @@ @@ -470,7 +470,7 @@
470 { 470 {
471 "index": 19, 471 "index": 19,
472 "label": { 472 "label": {
473 - "/P": "www", 473 + "/P": "u:www",
474 "/St": 1 474 "/St": 1
475 } 475 }
476 }, 476 },
@@ -513,8 +513,8 @@ @@ -513,8 +513,8 @@
513 "capabilities": { 513 "capabilities": {
514 "accessibility": true, 514 "accessibility": true,
515 "extract": true, 515 "extract": true,
516 - "moddifyannotations": true,  
517 "modify": true, 516 "modify": true,
  517 + "modifyannotations": true,
518 "modifyassembly": true, 518 "modifyassembly": true,
519 "modifyforms": true, 519 "modifyforms": true,
520 "modifyother": true, 520 "modifyother": true,
@@ -1219,17 +1219,17 @@ @@ -1219,17 +1219,17 @@
1219 }, 1219 },
1220 2, 1220 2,
1221 { 1221 {
1222 - "/P": "blank" 1222 + "/P": "u:blank"
1223 }, 1223 },
1224 3, 1224 3,
1225 { 1225 {
1226 - "/P": "X-", 1226 + "/P": "u:X-",
1227 "/S": "/A", 1227 "/S": "/A",
1228 "/St": 17 1228 "/St": 17
1229 }, 1229 },
1230 5, 1230 5,
1231 { 1231 {
1232 - "/P": "" 1232 + "/P": "u:"
1233 }, 1233 },
1234 6, 1234 6,
1235 { 1235 {
@@ -1261,13 +1261,13 @@ @@ -1261,13 +1261,13 @@
1261 }, 1261 },
1262 15, 1262 15,
1263 { 1263 {
1264 - "/P": "q.", 1264 + "/P": "u:q.",
1265 "/S": "/D", 1265 "/S": "/D",
1266 "/St": 6 1266 "/St": 6
1267 }, 1267 },
1268 19, 1268 19,
1269 { 1269 {
1270 - "/P": "www" 1270 + "/P": "u:www"
1271 } 1271 }
1272 ] 1272 ]
1273 } 1273 }
@@ -1590,8 +1590,8 @@ @@ -1590,8 +1590,8 @@
1590 "trailer": { 1590 "trailer": {
1591 "value": { 1591 "value": {
1592 "/ID": [ 1592 "/ID": [
1593 - "’ùˇÞxtó¼\\·¯½˚Ł7»",  
1594 - "\rþ˘©LÞ\u000fKýÈl\u0003¯ˇ\u0001\u000e" 1593 + "b:90f919de7874f3bc5cb7afbd1e9537bb",
  1594 + "b:0dfe18a94cde0f4bfdc86c03af19010e"
1595 ], 1595 ],
1596 "/Root": "1 0 R", 1596 "/Root": "1 0 R",
1597 "/Size": 100 1597 "/Size": 100
qpdf/qtest/qpdf/page_api_2-json-objects.out
@@ -3,161 +3,115 @@ @@ -3,161 +3,115 @@
3 "parameters": { 3 "parameters": {
4 "decodelevel": "generalized" 4 "decodelevel": "generalized"
5 }, 5 },
6 - "objects": {  
7 - "1 0 R": {  
8 - "/Pages": "3 0 R",  
9 - "/Type": "/Catalog"  
10 - },  
11 - "2 0 R": {  
12 - "/CreationDate": "u:D:20120621124041",  
13 - "/Producer": "u:Apex PDFWriter"  
14 - },  
15 - "3 0 R": {  
16 - "/Count": 3,  
17 - "/Kids": [  
18 - "4 0 R",  
19 - "4 0 R",  
20 - "5 0 R"  
21 - ],  
22 - "/Type": "/Pages"  
23 - },  
24 - "4 0 R": {  
25 - "/Contents": "6 0 R",  
26 - "/MediaBox": [  
27 - 0,  
28 - 0,  
29 - 612,  
30 - 792  
31 - ],  
32 - "/Parent": "3 0 R",  
33 - "/Resources": {  
34 - "/Font": {  
35 - "/F1": "8 0 R"  
36 - },  
37 - "/ProcSet": [  
38 - "/PDF",  
39 - "/Text"  
40 - ] 6 + "qpdf": {
  7 + "jsonversion": 2,
  8 + "pdfversion": "1.3",
  9 + "objects": {
  10 + "obj:1 0 R": {
  11 + "value": {
  12 + "/Pages": "3 0 R",
  13 + "/Type": "/Catalog"
  14 + }
41 }, 15 },
42 - "/Type": "/Page"  
43 - },  
44 - "5 0 R": {  
45 - "/Contents": "9 0 R",  
46 - "/MediaBox": [  
47 - 0,  
48 - 0,  
49 - 612,  
50 - 792  
51 - ],  
52 - "/Parent": "3 0 R",  
53 - "/Resources": {  
54 - "/Font": {  
55 - "/F1": "8 0 R"  
56 - },  
57 - "/ProcSet": [  
58 - "/PDF",  
59 - "/Text"  
60 - ] 16 + "obj:2 0 R": {
  17 + "value": {
  18 + "/CreationDate": "u:D:20120621124041",
  19 + "/Producer": "u:Apex PDFWriter"
  20 + }
61 }, 21 },
62 - "/Type": "/Page"  
63 - },  
64 - "6 0 R": {  
65 - "dict": {  
66 - "/Length": "7 0 R"  
67 - }  
68 - },  
69 - "7 0 R": 47,  
70 - "8 0 R": {  
71 - "/BaseFont": "/Times-Roman",  
72 - "/Encoding": "/WinAnsiEncoding",  
73 - "/Subtype": "/Type1",  
74 - "/Type": "/Font"  
75 - },  
76 - "9 0 R": {  
77 - "dict": {  
78 - "/Length": "10 0 R"  
79 - }  
80 - },  
81 - "10 0 R": 47,  
82 - "trailer": {  
83 - "/ID": [  
84 - "b:fb18b786ff7b358705da8a532aba8f6f",  
85 - "b:f7179eb35159bfd4c00f128abcfd1f02"  
86 - ],  
87 - "/Info": "2 0 R",  
88 - "/Root": "1 0 R",  
89 - "/Size": 11  
90 - }  
91 - },  
92 - "objectinfo": {  
93 - "1 0 R": {  
94 - "stream": {  
95 - "filter": null,  
96 - "is": false,  
97 - "length": null  
98 - }  
99 - },  
100 - "2 0 R": {  
101 - "stream": {  
102 - "filter": null,  
103 - "is": false,  
104 - "length": null  
105 - }  
106 - },  
107 - "3 0 R": {  
108 - "stream": {  
109 - "filter": null,  
110 - "is": false,  
111 - "length": null  
112 - }  
113 - },  
114 - "4 0 R": {  
115 - "stream": {  
116 - "filter": null,  
117 - "is": false,  
118 - "length": null  
119 - }  
120 - },  
121 - "5 0 R": {  
122 - "stream": {  
123 - "filter": null,  
124 - "is": false,  
125 - "length": null  
126 - }  
127 - },  
128 - "6 0 R": {  
129 - "stream": {  
130 - "filter": null,  
131 - "is": true,  
132 - "length": 47  
133 - }  
134 - },  
135 - "7 0 R": {  
136 - "stream": {  
137 - "filter": null,  
138 - "is": false,  
139 - "length": null  
140 - }  
141 - },  
142 - "8 0 R": {  
143 - "stream": {  
144 - "filter": null,  
145 - "is": false,  
146 - "length": null  
147 - }  
148 - },  
149 - "9 0 R": {  
150 - "stream": {  
151 - "filter": null,  
152 - "is": true,  
153 - "length": 47  
154 - }  
155 - },  
156 - "10 0 R": {  
157 - "stream": {  
158 - "filter": null,  
159 - "is": false,  
160 - "length": null 22 + "obj:3 0 R": {
  23 + "value": {
  24 + "/Count": 3,
  25 + "/Kids": [
  26 + "4 0 R",
  27 + "4 0 R",
  28 + "5 0 R"
  29 + ],
  30 + "/Type": "/Pages"
  31 + }
  32 + },
  33 + "obj:4 0 R": {
  34 + "value": {
  35 + "/Contents": "6 0 R",
  36 + "/MediaBox": [
  37 + 0,
  38 + 0,
  39 + 612,
  40 + 792
  41 + ],
  42 + "/Parent": "3 0 R",
  43 + "/Resources": {
  44 + "/Font": {
  45 + "/F1": "8 0 R"
  46 + },
  47 + "/ProcSet": [
  48 + "/PDF",
  49 + "/Text"
  50 + ]
  51 + },
  52 + "/Type": "/Page"
  53 + }
  54 + },
  55 + "obj:5 0 R": {
  56 + "value": {
  57 + "/Contents": "9 0 R",
  58 + "/MediaBox": [
  59 + 0,
  60 + 0,
  61 + 612,
  62 + 792
  63 + ],
  64 + "/Parent": "3 0 R",
  65 + "/Resources": {
  66 + "/Font": {
  67 + "/F1": "8 0 R"
  68 + },
  69 + "/ProcSet": [
  70 + "/PDF",
  71 + "/Text"
  72 + ]
  73 + },
  74 + "/Type": "/Page"
  75 + }
  76 + },
  77 + "obj:6 0 R": {
  78 + "stream": {
  79 + "dict": {
  80 + "/Length": "7 0 R"
  81 + }
  82 + }
  83 + },
  84 + "obj:7 0 R": {
  85 + "value": 47
  86 + },
  87 + "obj:8 0 R": {
  88 + "value": {
  89 + "/BaseFont": "/Times-Roman",
  90 + "/Encoding": "/WinAnsiEncoding",
  91 + "/Subtype": "/Type1",
  92 + "/Type": "/Font"
  93 + }
  94 + },
  95 + "obj:9 0 R": {
  96 + "stream": {
  97 + "dict": {
  98 + "/Length": "10 0 R"
  99 + }
  100 + }
  101 + },
  102 + "obj:10 0 R": {
  103 + "value": 47
  104 + },
  105 + "trailer": {
  106 + "value": {
  107 + "/ID": [
  108 + "b:fb18b786ff7b358705da8a532aba8f6f",
  109 + "b:f7179eb35159bfd4c00f128abcfd1f02"
  110 + ],
  111 + "/Info": "2 0 R",
  112 + "/Root": "1 0 R",
  113 + "/Size": 11
  114 + }
161 } 115 }
162 } 116 }
163 } 117 }
qpdf/qtest/qpdf/page_api_2-json-pages.out
@@ -35,188 +35,137 @@ @@ -35,188 +35,137 @@
35 "pageposfrom1": 3 35 "pageposfrom1": 3
36 } 36 }
37 ], 37 ],
38 - "objects": {  
39 - "1 0 R": {  
40 - "/Pages": "3 0 R",  
41 - "/Type": "/Catalog"  
42 - },  
43 - "2 0 R": {  
44 - "/CreationDate": "u:D:20120621124041",  
45 - "/Producer": "u:Apex PDFWriter"  
46 - },  
47 - "3 0 R": {  
48 - "/Count": 3,  
49 - "/Kids": [  
50 - "4 0 R",  
51 - "11 0 R",  
52 - "5 0 R"  
53 - ],  
54 - "/Type": "/Pages"  
55 - },  
56 - "4 0 R": {  
57 - "/Contents": "6 0 R",  
58 - "/MediaBox": [  
59 - 0,  
60 - 0,  
61 - 612,  
62 - 792  
63 - ],  
64 - "/Parent": "3 0 R",  
65 - "/Resources": {  
66 - "/Font": {  
67 - "/F1": "8 0 R"  
68 - },  
69 - "/ProcSet": [  
70 - "/PDF",  
71 - "/Text"  
72 - ] 38 + "qpdf": {
  39 + "jsonversion": 2,
  40 + "pdfversion": "1.3",
  41 + "objects": {
  42 + "obj:1 0 R": {
  43 + "value": {
  44 + "/Pages": "3 0 R",
  45 + "/Type": "/Catalog"
  46 + }
73 }, 47 },
74 - "/Type": "/Page"  
75 - },  
76 - "5 0 R": {  
77 - "/Contents": "9 0 R",  
78 - "/MediaBox": [  
79 - 0,  
80 - 0,  
81 - 612,  
82 - 792  
83 - ],  
84 - "/Parent": "3 0 R",  
85 - "/Resources": {  
86 - "/Font": {  
87 - "/F1": "8 0 R"  
88 - },  
89 - "/ProcSet": [  
90 - "/PDF",  
91 - "/Text"  
92 - ] 48 + "obj:2 0 R": {
  49 + "value": {
  50 + "/CreationDate": "u:D:20120621124041",
  51 + "/Producer": "u:Apex PDFWriter"
  52 + }
93 }, 53 },
94 - "/Type": "/Page"  
95 - },  
96 - "6 0 R": {  
97 - "dict": {  
98 - "/Length": "7 0 R"  
99 - }  
100 - },  
101 - "7 0 R": 47,  
102 - "8 0 R": {  
103 - "/BaseFont": "/Times-Roman",  
104 - "/Encoding": "/WinAnsiEncoding",  
105 - "/Subtype": "/Type1",  
106 - "/Type": "/Font"  
107 - },  
108 - "9 0 R": {  
109 - "dict": {  
110 - "/Length": "10 0 R"  
111 - }  
112 - },  
113 - "10 0 R": 47,  
114 - "11 0 R": {  
115 - "/Contents": "6 0 R",  
116 - "/MediaBox": [  
117 - 0,  
118 - 0,  
119 - 612,  
120 - 792  
121 - ],  
122 - "/Parent": "3 0 R",  
123 - "/Resources": {  
124 - "/Font": {  
125 - "/F1": "8 0 R"  
126 - },  
127 - "/ProcSet": [  
128 - "/PDF",  
129 - "/Text"  
130 - ] 54 + "obj:3 0 R": {
  55 + "value": {
  56 + "/Count": 3,
  57 + "/Kids": [
  58 + "4 0 R",
  59 + "11 0 R",
  60 + "5 0 R"
  61 + ],
  62 + "/Type": "/Pages"
  63 + }
131 }, 64 },
132 - "/Type": "/Page"  
133 - },  
134 - "trailer": {  
135 - "/ID": [  
136 - "b:fb18b786ff7b358705da8a532aba8f6f",  
137 - "b:f7179eb35159bfd4c00f128abcfd1f02"  
138 - ],  
139 - "/Info": "2 0 R",  
140 - "/Root": "1 0 R",  
141 - "/Size": 11  
142 - }  
143 - },  
144 - "objectinfo": {  
145 - "1 0 R": {  
146 - "stream": {  
147 - "filter": null,  
148 - "is": false,  
149 - "length": null  
150 - }  
151 - },  
152 - "2 0 R": {  
153 - "stream": {  
154 - "filter": null,  
155 - "is": false,  
156 - "length": null  
157 - }  
158 - },  
159 - "3 0 R": {  
160 - "stream": {  
161 - "filter": null,  
162 - "is": false,  
163 - "length": null  
164 - }  
165 - },  
166 - "4 0 R": {  
167 - "stream": {  
168 - "filter": null,  
169 - "is": false,  
170 - "length": null  
171 - }  
172 - },  
173 - "5 0 R": {  
174 - "stream": {  
175 - "filter": null,  
176 - "is": false,  
177 - "length": null  
178 - }  
179 - },  
180 - "6 0 R": {  
181 - "stream": {  
182 - "filter": null,  
183 - "is": true,  
184 - "length": 47  
185 - }  
186 - },  
187 - "7 0 R": {  
188 - "stream": {  
189 - "filter": null,  
190 - "is": false,  
191 - "length": null  
192 - }  
193 - },  
194 - "8 0 R": {  
195 - "stream": {  
196 - "filter": null,  
197 - "is": false,  
198 - "length": null  
199 - }  
200 - },  
201 - "9 0 R": {  
202 - "stream": {  
203 - "filter": null,  
204 - "is": true,  
205 - "length": 47  
206 - }  
207 - },  
208 - "10 0 R": {  
209 - "stream": {  
210 - "filter": null,  
211 - "is": false,  
212 - "length": null  
213 - }  
214 - },  
215 - "11 0 R": {  
216 - "stream": {  
217 - "filter": null,  
218 - "is": false,  
219 - "length": null 65 + "obj:4 0 R": {
  66 + "value": {
  67 + "/Contents": "6 0 R",
  68 + "/MediaBox": [
  69 + 0,
  70 + 0,
  71 + 612,
  72 + 792
  73 + ],
  74 + "/Parent": "3 0 R",
  75 + "/Resources": {
  76 + "/Font": {
  77 + "/F1": "8 0 R"
  78 + },
  79 + "/ProcSet": [
  80 + "/PDF",
  81 + "/Text"
  82 + ]
  83 + },
  84 + "/Type": "/Page"
  85 + }
  86 + },
  87 + "obj:5 0 R": {
  88 + "value": {
  89 + "/Contents": "9 0 R",
  90 + "/MediaBox": [
  91 + 0,
  92 + 0,
  93 + 612,
  94 + 792
  95 + ],
  96 + "/Parent": "3 0 R",
  97 + "/Resources": {
  98 + "/Font": {
  99 + "/F1": "8 0 R"
  100 + },
  101 + "/ProcSet": [
  102 + "/PDF",
  103 + "/Text"
  104 + ]
  105 + },
  106 + "/Type": "/Page"
  107 + }
  108 + },
  109 + "obj:6 0 R": {
  110 + "stream": {
  111 + "dict": {
  112 + "/Length": "7 0 R"
  113 + }
  114 + }
  115 + },
  116 + "obj:7 0 R": {
  117 + "value": 47
  118 + },
  119 + "obj:8 0 R": {
  120 + "value": {
  121 + "/BaseFont": "/Times-Roman",
  122 + "/Encoding": "/WinAnsiEncoding",
  123 + "/Subtype": "/Type1",
  124 + "/Type": "/Font"
  125 + }
  126 + },
  127 + "obj:9 0 R": {
  128 + "stream": {
  129 + "dict": {
  130 + "/Length": "10 0 R"
  131 + }
  132 + }
  133 + },
  134 + "obj:10 0 R": {
  135 + "value": 47
  136 + },
  137 + "obj:11 0 R": {
  138 + "value": {
  139 + "/Contents": "6 0 R",
  140 + "/MediaBox": [
  141 + 0,
  142 + 0,
  143 + 612,
  144 + 792
  145 + ],
  146 + "/Parent": "3 0 R",
  147 + "/Resources": {
  148 + "/Font": {
  149 + "/F1": "8 0 R"
  150 + },
  151 + "/ProcSet": [
  152 + "/PDF",
  153 + "/Text"
  154 + ]
  155 + },
  156 + "/Type": "/Page"
  157 + }
  158 + },
  159 + "trailer": {
  160 + "value": {
  161 + "/ID": [
  162 + "b:fb18b786ff7b358705da8a532aba8f6f",
  163 + "b:f7179eb35159bfd4c00f128abcfd1f02"
  164 + ],
  165 + "/Info": "2 0 R",
  166 + "/Root": "1 0 R",
  167 + "/Size": 11
  168 + }
220 } 169 }
221 } 170 }
222 } 171 }