diff options
Diffstat (limited to 'qpdf/qtest')
-rw-r--r-- | qpdf/qtest/qpdf.test | 33 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/bad16-recover.out | 8 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/bad16.out | 4 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/bad18-recover.out | 9 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/bad18.out | 8 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/bad19-recover.out | 9 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/bad19.out | 8 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/bad20-recover.out | 13 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/bad20.out | 12 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/bad21-recover.out | 11 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/bad21.out | 10 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/bad29-recover.out | 11 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/bad29.out | 10 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/issue-100.out | 3 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/issue-101.out | 70 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/issue-146.out | 4 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/issue-51.out | 3 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/linearization-bounds-1.out | 2 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/object-types-os.out | 41 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/object-types-os.pdf | bin | 0 -> 865 bytes | |||
-rw-r--r-- | qpdf/qtest/qpdf/object-types.out | 41 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/object-types.pdf | 111 |
22 files changed, 391 insertions, 30 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test index 45c750fd..b5939703 100644 --- a/qpdf/qtest/qpdf.test +++ b/qpdf/qtest/qpdf.test @@ -212,7 +212,7 @@ my @bug_tests = ( ["99", "object 0", 2], ["99b", "object 0", 2], ["100", "xref reconstruction loop", 2], - ["101", "resolve for exception text", 2], + ["101", "resolve for exception text", 3], ["117", "other infinite loop", 2], ["118", "other infinite loop", 2], ["119", "other infinite loop", 3], @@ -736,6 +736,33 @@ $td->runtest("stream with tiff predictor", show_ntests(); # ---------- +$td->notify("--- Type checks ---"); +$n_tests += 4; +# Whenever object-types.pdf is edited, object-types-os.pdf should be +# regenerated. +$td->runtest("ensure object-types-os is up-to-date", + {$td->COMMAND => + "qpdf" . + " --object-streams=generate" . + " --deterministic-id" . + " --stream-data=uncompress" . + " object-types.pdf a.pdf"}, + {$td->STRING => "", $td->EXIT_STATUS => 0}); +$td->runtest("check file", + {$td->FILE => "a.pdf"}, + {$td->FILE => "object-types-os.pdf"}); +$td->runtest("type checks", + {$td->COMMAND => "test_driver 42 object-types.pdf"}, + {$td->FILE => "object-types.out", + $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); +$td->runtest("type checks with object streams", + {$td->COMMAND => "test_driver 42 object-types-os.pdf"}, + {$td->FILE => "object-types-os.out", + $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); + +# ---------- $td->notify("--- Coalesce contents ---"); $n_tests += 6; @@ -1200,7 +1227,7 @@ $n_tests += @badfiles + 3; # have error conditions that used to be fatal but are now considered # non-fatal. my %badtest_overrides = (); -for(6, 12..15, 17, 22..28, 30..32, 34, 36) +for(6, 12..15, 17, 18..32, 34, 36) { $badtest_overrides{$_} = 0; } @@ -1243,7 +1270,7 @@ $n_tests += @badfiles + 6; # though in some cases it may. Acrobat Reader would not be able to # recover any of these files any better. my %recover_failures = (); -for (1, 7, 16, 18..21, 29, 35) +for (1, 7, 16, 35) { $recover_failures{$_} = 1; } diff --git a/qpdf/qtest/qpdf/bad16-recover.out b/qpdf/qtest/qpdf/bad16-recover.out index 5ed231d8..adddb4f7 100644 --- a/qpdf/qtest/qpdf/bad16-recover.out +++ b/qpdf/qtest/qpdf/bad16-recover.out @@ -1,10 +1,14 @@ WARNING: bad16.pdf (trailer, offset 753): unexpected dictionary close token WARNING: bad16.pdf (trailer, offset 756): unexpected dictionary close token WARNING: bad16.pdf (trailer, offset 759): unknown token while reading object; treating as string -WARNING: bad16.pdf: file is damaged WARNING: bad16.pdf (trailer, offset 779): unexpected EOF +WARNING: bad16.pdf (trailer, offset 779): parse error while reading object +WARNING: bad16.pdf: file is damaged +WARNING: bad16.pdf (offset 712): expected trailer dictionary WARNING: bad16.pdf: Attempting to reconstruct cross-reference table WARNING: bad16.pdf (trailer, offset 753): unexpected dictionary close token WARNING: bad16.pdf (trailer, offset 756): unexpected dictionary close token WARNING: bad16.pdf (trailer, offset 759): unknown token while reading object; treating as string -bad16.pdf (trailer, offset 779): unexpected EOF +WARNING: bad16.pdf (trailer, offset 779): unexpected EOF +WARNING: bad16.pdf (trailer, offset 779): parse error while reading object +bad16.pdf: unable to find trailer dictionary while recovering damaged file diff --git a/qpdf/qtest/qpdf/bad16.out b/qpdf/qtest/qpdf/bad16.out index 1018bd7b..bcc37f35 100644 --- a/qpdf/qtest/qpdf/bad16.out +++ b/qpdf/qtest/qpdf/bad16.out @@ -1,4 +1,6 @@ WARNING: bad16.pdf (trailer, offset 753): unexpected dictionary close token WARNING: bad16.pdf (trailer, offset 756): unexpected dictionary close token WARNING: bad16.pdf (trailer, offset 759): unknown token while reading object; treating as string -bad16.pdf (trailer, offset 779): unexpected EOF +WARNING: bad16.pdf (trailer, offset 779): unexpected EOF +WARNING: bad16.pdf (trailer, offset 779): parse error while reading object +bad16.pdf (offset 712): expected trailer dictionary diff --git a/qpdf/qtest/qpdf/bad18-recover.out b/qpdf/qtest/qpdf/bad18-recover.out index c14bc1f3..7814c8ac 100644 --- a/qpdf/qtest/qpdf/bad18-recover.out +++ b/qpdf/qtest/qpdf/bad18-recover.out @@ -1,4 +1,7 @@ -WARNING: bad18.pdf: file is damaged WARNING: bad18.pdf (trailer, offset 753): unexpected ) -WARNING: bad18.pdf: Attempting to reconstruct cross-reference table -bad18.pdf (trailer, offset 753): unexpected ) +/QTest is implicit +/QTest is direct and has type null (2) +/QTest is null +unparse: null +unparseResolved: null +test 1 done diff --git a/qpdf/qtest/qpdf/bad18.out b/qpdf/qtest/qpdf/bad18.out index b6bce222..53d64cb1 100644 --- a/qpdf/qtest/qpdf/bad18.out +++ b/qpdf/qtest/qpdf/bad18.out @@ -1 +1,7 @@ -bad18.pdf (trailer, offset 753): unexpected ) +WARNING: bad18.pdf (trailer, offset 753): unexpected ) +/QTest is implicit +/QTest is direct and has type null (2) +/QTest is null +unparse: null +unparseResolved: null +test 0 done diff --git a/qpdf/qtest/qpdf/bad19-recover.out b/qpdf/qtest/qpdf/bad19-recover.out index ced8f51a..a828e0ed 100644 --- a/qpdf/qtest/qpdf/bad19-recover.out +++ b/qpdf/qtest/qpdf/bad19-recover.out @@ -1,4 +1,7 @@ -WARNING: bad19.pdf: file is damaged WARNING: bad19.pdf (trailer, offset 753): unexpected > -WARNING: bad19.pdf: Attempting to reconstruct cross-reference table -bad19.pdf (trailer, offset 753): unexpected > +/QTest is implicit +/QTest is direct and has type null (2) +/QTest is null +unparse: null +unparseResolved: null +test 1 done diff --git a/qpdf/qtest/qpdf/bad19.out b/qpdf/qtest/qpdf/bad19.out index 36eda04f..eafe3d88 100644 --- a/qpdf/qtest/qpdf/bad19.out +++ b/qpdf/qtest/qpdf/bad19.out @@ -1 +1,7 @@ -bad19.pdf (trailer, offset 753): unexpected > +WARNING: bad19.pdf (trailer, offset 753): unexpected > +/QTest is implicit +/QTest is direct and has type null (2) +/QTest is null +unparse: null +unparseResolved: null +test 0 done diff --git a/qpdf/qtest/qpdf/bad20-recover.out b/qpdf/qtest/qpdf/bad20-recover.out index 8411d5a9..a9507671 100644 --- a/qpdf/qtest/qpdf/bad20-recover.out +++ b/qpdf/qtest/qpdf/bad20-recover.out @@ -1,4 +1,11 @@ -WARNING: bad20.pdf: file is damaged WARNING: bad20.pdf (trailer, offset 753): invalid character (q) in hexstring -WARNING: bad20.pdf: Attempting to reconstruct cross-reference table -bad20.pdf (trailer, offset 753): invalid character (q) in hexstring +WARNING: bad20.pdf (trailer, offset 757): unknown token while reading object; treating as string +WARNING: bad20.pdf (trailer, offset 758): unexpected > +WARNING: bad20.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake1 +WARNING: bad20.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake2 +/QTest is implicit +/QTest is direct and has type null (2) +/QTest is null +unparse: null +unparseResolved: null +test 1 done diff --git a/qpdf/qtest/qpdf/bad20.out b/qpdf/qtest/qpdf/bad20.out index 8cdad1f1..7253932b 100644 --- a/qpdf/qtest/qpdf/bad20.out +++ b/qpdf/qtest/qpdf/bad20.out @@ -1 +1,11 @@ -bad20.pdf (trailer, offset 753): invalid character (q) in hexstring +WARNING: bad20.pdf (trailer, offset 753): invalid character (q) in hexstring +WARNING: bad20.pdf (trailer, offset 757): unknown token while reading object; treating as string +WARNING: bad20.pdf (trailer, offset 758): unexpected > +WARNING: bad20.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake1 +WARNING: bad20.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake2 +/QTest is implicit +/QTest is direct and has type null (2) +/QTest is null +unparse: null +unparseResolved: null +test 0 done diff --git a/qpdf/qtest/qpdf/bad21-recover.out b/qpdf/qtest/qpdf/bad21-recover.out index ff483eff..cbf55baf 100644 --- a/qpdf/qtest/qpdf/bad21-recover.out +++ b/qpdf/qtest/qpdf/bad21-recover.out @@ -1,4 +1,9 @@ -WARNING: bad21.pdf: file is damaged WARNING: bad21.pdf (trailer, offset 742): invalid name token -WARNING: bad21.pdf: Attempting to reconstruct cross-reference table -bad21.pdf (trailer, offset 742): invalid name token +WARNING: bad21.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake1 +WARNING: bad21.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake2 +/QTest is implicit +/QTest is direct and has type null (2) +/QTest is null +unparse: null +unparseResolved: null +test 1 done diff --git a/qpdf/qtest/qpdf/bad21.out b/qpdf/qtest/qpdf/bad21.out index b1a57fef..eab6f636 100644 --- a/qpdf/qtest/qpdf/bad21.out +++ b/qpdf/qtest/qpdf/bad21.out @@ -1 +1,9 @@ -bad21.pdf (trailer, offset 742): invalid name token +WARNING: bad21.pdf (trailer, offset 742): invalid name token +WARNING: bad21.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake1 +WARNING: bad21.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake2 +/QTest is implicit +/QTest is direct and has type null (2) +/QTest is null +unparse: null +unparseResolved: null +test 0 done diff --git a/qpdf/qtest/qpdf/bad29-recover.out b/qpdf/qtest/qpdf/bad29-recover.out index bc6c9b09..2f78b306 100644 --- a/qpdf/qtest/qpdf/bad29-recover.out +++ b/qpdf/qtest/qpdf/bad29-recover.out @@ -1,4 +1,9 @@ -WARNING: bad29.pdf: file is damaged WARNING: bad29.pdf (trailer, offset 742): null character not allowed in name token -WARNING: bad29.pdf: Attempting to reconstruct cross-reference table -bad29.pdf (trailer, offset 742): null character not allowed in name token +WARNING: bad29.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake1 +WARNING: bad29.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake2 +/QTest is implicit +/QTest is direct and has type null (2) +/QTest is null +unparse: null +unparseResolved: null +test 1 done diff --git a/qpdf/qtest/qpdf/bad29.out b/qpdf/qtest/qpdf/bad29.out index e9ded462..f1e8aa38 100644 --- a/qpdf/qtest/qpdf/bad29.out +++ b/qpdf/qtest/qpdf/bad29.out @@ -1 +1,9 @@ -bad29.pdf (trailer, offset 742): null character not allowed in name token +WARNING: bad29.pdf (trailer, offset 742): null character not allowed in name token +WARNING: bad29.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake1 +WARNING: bad29.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake2 +/QTest is implicit +/QTest is direct and has type null (2) +/QTest is null +unparse: null +unparseResolved: null +test 0 done diff --git a/qpdf/qtest/qpdf/issue-100.out b/qpdf/qtest/qpdf/issue-100.out index e5007541..da286551 100644 --- a/qpdf/qtest/qpdf/issue-100.out +++ b/qpdf/qtest/qpdf/issue-100.out @@ -8,6 +8,9 @@ WARNING: issue-100.pdf (object 5 0, offset 294): unknown token while reading obj WARNING: issue-100.pdf (object 5 0, offset 297): unknown token while reading object; treating as string WARNING: issue-100.pdf (object 5 0, offset 304): unknown token while reading object; treating as string WARNING: issue-100.pdf (object 5 0, offset 308): unexpected ) +WARNING: issue-100.pdf (object 5 0, offset 316): treating unexpected array close token as null +WARNING: issue-100.pdf (object 5 0, offset 227): expected dictionary key but found non-name object; inserting key /QPDFFake1 +WARNING: issue-100.pdf (object 5 0, offset 321): expected endobj WARNING: issue-100.pdf (object 5 0, offset 418): /Length key in stream dictionary is not an integer WARNING: issue-100.pdf (object 5 0, offset 489): attempting to recover stream length WARNING: issue-100.pdf (object 5 0, offset 489): recovered stream length: 12 diff --git a/qpdf/qtest/qpdf/issue-101.out b/qpdf/qtest/qpdf/issue-101.out index 29ccbfb7..f1e4d03a 100644 --- a/qpdf/qtest/qpdf/issue-101.out +++ b/qpdf/qtest/qpdf/issue-101.out @@ -56,4 +56,72 @@ WARNING: issue-101.pdf (object 11 0, offset 811): unknown token while reading ob WARNING: issue-101.pdf (object 11 0, offset 819): unknown token while reading object; treating as string WARNING: issue-101.pdf (object 11 0, offset 832): unknown token while reading object; treating as string WARNING: issue-101.pdf (object 11 0, offset 856): unexpected > -issue-101.pdf (offset 856): unable to find /Root dictionary +WARNING: issue-101.pdf (object 11 0, offset 857): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 868): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 887): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 897): unexpected ) +WARNING: issue-101.pdf (object 11 0, offset 898): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 909): invalid character (¤) in hexstring +WARNING: issue-101.pdf (object 11 0, offset 911): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 929): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 930): invalid character (²) in hexstring +WARNING: issue-101.pdf (object 11 0, offset 932): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 944): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 947): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 970): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1046): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1067): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1075): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1080): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1084): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1102): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1112): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1124): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1133): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1145): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1148): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1150): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1151): unexpected ) +WARNING: issue-101.pdf (object 11 0, offset 1153): unexpected dictionary close token +WARNING: issue-101.pdf (object 11 0, offset 1156): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1163): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1168): unexpected > +WARNING: issue-101.pdf (object 11 0, offset 1170): invalid character (I) in hexstring +WARNING: issue-101.pdf (object 11 0, offset 1167): expected dictionary key but found non-name object; inserting key /QPDFFake1 +WARNING: issue-101.pdf (object 11 0, offset 1167): expected dictionary key but found non-name object; inserting key /QPDFFake2 +WARNING: issue-101.pdf (object 11 0, offset 1167): expected dictionary key but found non-name object; inserting key /QPDFFake3 +WARNING: issue-101.pdf (object 11 0, offset 1176): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1180): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1184): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1190): unexpected > +WARNING: issue-101.pdf (object 11 0, offset 1192): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1195): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1205): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1217): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1224): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1236): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1242): expected dictionary key but found non-name object; inserting key /QPDFFake1 +WARNING: issue-101.pdf (object 11 0, offset 1242): dictionary ended prematurely; using null as value for last key +WARNING: issue-101.pdf (object 11 0, offset 1275): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1287): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1291): unexpected dictionary close token +WARNING: issue-101.pdf (object 11 0, offset 1294): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1306): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1322): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1325): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1329): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1341): treating unexpected array close token as null +WARNING: issue-101.pdf (object 11 0, offset 1312): expected dictionary key but found non-name object; inserting key /QPDFFake1 +WARNING: issue-101.pdf (object 11 0, offset 1312): expected dictionary key but found non-name object; inserting key /QPDFFake2 +WARNING: issue-101.pdf (object 11 0, offset 1312): expected dictionary key but found non-name object; inserting key /QPDFFake3 +WARNING: issue-101.pdf (object 11 0, offset 1312): expected dictionary key but found non-name object; inserting key /QPDFFake4 +WARNING: issue-101.pdf (object 11 0, offset 1312): dictionary ended prematurely; using null as value for last key +WARNING: issue-101.pdf (object 11 0, offset 1349): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1353): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1357): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1359): unknown token while reading object; treating as string +WARNING: issue-101.pdf (object 11 0, offset 1368): unexpected ) +WARNING: issue-101.pdf (object 11 0, offset 1373): expected endobj +WARNING: issue-101.pdf (object 8 0, offset 4067): invalid character ()) in hexstring +WARNING: issue-101.pdf (object 8 0, offset 4069): expected endobj +qpdf: operation succeeded with warnings; resulting file may have some problems diff --git a/qpdf/qtest/qpdf/issue-146.out b/qpdf/qtest/qpdf/issue-146.out index fc92ab65..79bb8118 100644 --- a/qpdf/qtest/qpdf/issue-146.out +++ b/qpdf/qtest/qpdf/issue-146.out @@ -2,4 +2,6 @@ WARNING: issue-146.pdf: file is damaged WARNING: issue-146.pdf: can't find startxref WARNING: issue-146.pdf: Attempting to reconstruct cross-reference table WARNING: issue-146.pdf (trailer, offset 20728): unknown token while reading object; treating as string -issue-146.pdf (trailer, offset 20732): unexpected EOF +WARNING: issue-146.pdf (trailer, offset 20732): unexpected EOF +WARNING: issue-146.pdf (trailer, offset 20732): parse error while reading object +issue-146.pdf: unable to find trailer dictionary while recovering damaged file diff --git a/qpdf/qtest/qpdf/issue-51.out b/qpdf/qtest/qpdf/issue-51.out index 7873886b..692c0984 100644 --- a/qpdf/qtest/qpdf/issue-51.out +++ b/qpdf/qtest/qpdf/issue-51.out @@ -6,5 +6,6 @@ WARNING: issue-51.pdf (offset 70): loop detected resolving object 2 0 WARNING: issue-51.pdf (object 2 0, offset 26): /Length key in stream dictionary is not an integer WARNING: issue-51.pdf (object 2 0, offset 71): attempting to recover stream length WARNING: issue-51.pdf (object 2 0, offset 71): unable to recover stream data; treating stream as empty -WARNING: issue-51.pdf (object 2 0, offset 977): unexpected EOF +WARNING: issue-51.pdf (object 2 0, offset 977): expected endobj +WARNING: issue-51.pdf (object 2 0, offset 977): EOF after endobj qpdf: operation succeeded with warnings; resulting file may have some problems diff --git a/qpdf/qtest/qpdf/linearization-bounds-1.out b/qpdf/qtest/qpdf/linearization-bounds-1.out index 066dc883..d92c51c5 100644 --- a/qpdf/qtest/qpdf/linearization-bounds-1.out +++ b/qpdf/qtest/qpdf/linearization-bounds-1.out @@ -2,7 +2,7 @@ checking linearization-bounds-1.pdf PDF Version: 1.3 File is not encrypted File is linearized -WARNING: linearization-bounds-1.pdf (linearization hint stream: object 62 0, offset 12302): unexpected EOF +WARNING: linearization-bounds-1.pdf (linearization hint stream: object 62 0, offset 12302): expected endstream WARNING: linearization-bounds-1.pdf (linearization hint stream: object 62 0, offset 1183): attempting to recover stream length WARNING: linearization-bounds-1.pdf (linearization hint stream: object 62 0, offset 1183): recovered stream length: 106 linearization-bounds-1.pdf (linearization hint table, offset 1183): /S (shared object) offset is out of bounds diff --git a/qpdf/qtest/qpdf/object-types-os.out b/qpdf/qtest/qpdf/object-types-os.out new file mode 100644 index 00000000..26fcf369 --- /dev/null +++ b/qpdf/qtest/qpdf/object-types-os.out @@ -0,0 +1,41 @@ +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 347: operation for string attempted on object of type dictionary: returning empty string +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 384: returning null for out of bounds array access +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 384: returning null for out of bounds array access +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for array attempted on object of type integer: returning null +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for array attempted on object of type integer: ignoring attempt to append item +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 384: ignoring attempt to erase out of bounds array item +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 384: ignoring attempt to erase out of bounds array item +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for array attempted on object of type integer: ignoring attempt to erase item +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for array attempted on object of type integer: ignoring attempt to insert item +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for array attempted on object of type integer: ignoring attempt to replace items +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for array attempted on object of type integer: ignoring attempt to set item +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for array attempted on object of type integer: treating as empty +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for array attempted on object of type integer: treating as empty +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for boolean attempted on object of type integer: returning false +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for dictionary attempted on object of type integer: treating as empty +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for dictionary attempted on object of type integer: treating as empty +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for dictionary attempted on object of type integer: returning false for a key containment request +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for dictionary attempted on object of type integer: ignoring key removal request +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for dictionary attempted on object of type integer: ignoring key removal/replacement request +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for dictionary attempted on object of type integer: ignoring key removal/replacement request +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for dictionary attempted on object of type integer: ignoring key replacement request +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for dictionary attempted on object of type integer: returning null for attempted key retrieval +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for inlineimage attempted on object of type integer: returning empty data +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 362: operation for integer attempted on object of type dictionary: returning 0 +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for name attempted on object of type integer: returning dummy name +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for operator attempted on object of type integer: returning fake value +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 362: operation for real attempted on object of type dictionary: returning 0.0 +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for string attempted on object of type integer: returning empty string +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 429: operation for string attempted on object of type integer: returning empty string +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 362: operation for number attempted on object of type dictionary: returning 0 +One error +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 385: operation for string attempted on object of type name: returning empty string +One error +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 362 -> dictionary key /Quack: operation for string attempted on object of type null: returning empty string +Two errors +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 384: returning null for out of bounds array access +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 384 -> null returned from invalid array access: operation for string attempted on object of type null: returning empty string +One error +WARNING: object-types-os.pdf object stream 1, object 7 0 at offset 400: operation for string attempted on object of type name: returning empty string +WARNING: object-types-os.pdf, object 8 0 at offset 538 -> dictionary key /Potato: operation for name attempted on object of type null: returning dummy name +test 42 done diff --git a/qpdf/qtest/qpdf/object-types-os.pdf b/qpdf/qtest/qpdf/object-types-os.pdf Binary files differnew file mode 100644 index 00000000..652ed35b --- /dev/null +++ b/qpdf/qtest/qpdf/object-types-os.pdf diff --git a/qpdf/qtest/qpdf/object-types.out b/qpdf/qtest/qpdf/object-types.out new file mode 100644 index 00000000..b707a957 --- /dev/null +++ b/qpdf/qtest/qpdf/object-types.out @@ -0,0 +1,41 @@ +WARNING: object-types.pdf, object 8 0 at offset 657: operation for string attempted on object of type dictionary: returning empty string +WARNING: object-types.pdf, object 8 0 at offset 717: returning null for out of bounds array access +WARNING: object-types.pdf, object 8 0 at offset 717: returning null for out of bounds array access +WARNING: object-types.pdf, object 8 0 at offset 669: operation for array attempted on object of type integer: returning null +WARNING: object-types.pdf, object 8 0 at offset 669: operation for array attempted on object of type integer: ignoring attempt to append item +WARNING: object-types.pdf, object 8 0 at offset 717: ignoring attempt to erase out of bounds array item +WARNING: object-types.pdf, object 8 0 at offset 717: ignoring attempt to erase out of bounds array item +WARNING: object-types.pdf, object 8 0 at offset 669: operation for array attempted on object of type integer: ignoring attempt to erase item +WARNING: object-types.pdf, object 8 0 at offset 669: operation for array attempted on object of type integer: ignoring attempt to insert item +WARNING: object-types.pdf, object 8 0 at offset 669: operation for array attempted on object of type integer: ignoring attempt to replace items +WARNING: object-types.pdf, object 8 0 at offset 669: operation for array attempted on object of type integer: ignoring attempt to set item +WARNING: object-types.pdf, object 8 0 at offset 669: operation for array attempted on object of type integer: treating as empty +WARNING: object-types.pdf, object 8 0 at offset 669: operation for array attempted on object of type integer: treating as empty +WARNING: object-types.pdf, object 8 0 at offset 669: operation for boolean attempted on object of type integer: returning false +WARNING: object-types.pdf, object 8 0 at offset 669: operation for dictionary attempted on object of type integer: treating as empty +WARNING: object-types.pdf, object 8 0 at offset 669: operation for dictionary attempted on object of type integer: treating as empty +WARNING: object-types.pdf, object 8 0 at offset 669: operation for dictionary attempted on object of type integer: returning false for a key containment request +WARNING: object-types.pdf, object 8 0 at offset 669: operation for dictionary attempted on object of type integer: ignoring key removal request +WARNING: object-types.pdf, object 8 0 at offset 669: operation for dictionary attempted on object of type integer: ignoring key removal/replacement request +WARNING: object-types.pdf, object 8 0 at offset 669: operation for dictionary attempted on object of type integer: ignoring key removal/replacement request +WARNING: object-types.pdf, object 8 0 at offset 669: operation for dictionary attempted on object of type integer: ignoring key replacement request +WARNING: object-types.pdf, object 8 0 at offset 669: operation for dictionary attempted on object of type integer: returning null for attempted key retrieval +WARNING: object-types.pdf, object 8 0 at offset 669: operation for inlineimage attempted on object of type integer: returning empty data +WARNING: object-types.pdf, object 8 0 at offset 687: operation for integer attempted on object of type dictionary: returning 0 +WARNING: object-types.pdf, object 8 0 at offset 669: operation for name attempted on object of type integer: returning dummy name +WARNING: object-types.pdf, object 8 0 at offset 669: operation for operator attempted on object of type integer: returning fake value +WARNING: object-types.pdf, object 8 0 at offset 687: operation for real attempted on object of type dictionary: returning 0.0 +WARNING: object-types.pdf, object 8 0 at offset 669: operation for string attempted on object of type integer: returning empty string +WARNING: object-types.pdf, object 8 0 at offset 669: operation for string attempted on object of type integer: returning empty string +WARNING: object-types.pdf, object 8 0 at offset 687: operation for number attempted on object of type dictionary: returning 0 +One error +WARNING: object-types.pdf, object 8 0 at offset 724: operation for string attempted on object of type name: returning empty string +One error +WARNING: object-types.pdf, object 8 0 at offset 687 -> dictionary key /Quack: operation for string attempted on object of type null: returning empty string +Two errors +WARNING: object-types.pdf, object 8 0 at offset 717: returning null for out of bounds array access +WARNING: object-types.pdf, object 8 0 at offset 717 -> null returned from invalid array access: operation for string attempted on object of type null: returning empty string +One error +WARNING: object-types.pdf, object 8 0 at offset 745: operation for string attempted on object of type name: returning empty string +WARNING: object-types.pdf, object 4 0 at offset 386 -> dictionary key /Potato: operation for name attempted on object of type null: returning dummy name +test 42 done diff --git a/qpdf/qtest/qpdf/object-types.pdf b/qpdf/qtest/qpdf/object-types.pdf new file mode 100644 index 00000000..a283d129 --- /dev/null +++ b/qpdf/qtest/qpdf/object-types.pdf @@ -0,0 +1,111 @@ +%PDF-1.3 +%¿÷¢þ +%QDF-1.0 + +1 0 obj +<< + /Pages 2 0 R + /Type /Catalog +>> +endobj + +2 0 obj +<< + /Count 1 + /Kids [ + 3 0 R + ] + /Type /Pages +>> +endobj + +%% Page 1 +3 0 obj +<< + /Contents 4 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 6 0 R + >> + /ProcSet 7 0 R + >> + /Type /Page +>> +endobj + +%% Contents for page 1 +4 0 obj +<< + /Length 5 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato) Tj +ET +endstream +endobj + +5 0 obj +44 +endobj + +6 0 obj +<< + /BaseFont /Helvetica + /Encoding /WinAnsiEncoding + /Name /F1 + /Subtype /Type1 + /Type /Font +>> +endobj + +7 0 obj +[ + /PDF + /Text +] +endobj + +8 0 obj +<< + /Integer 5 + /Dictionary << + /Key1 /Value1 + /Key2 [ + /Item0 + << /K [ /V ] >> + /Item2 + ] + >> +>> +endobj + +xref +0 9 +0000000000 65535 f +0000000025 00000 n +0000000079 00000 n +0000000161 00000 n +0000000376 00000 n +0000000475 00000 n +0000000494 00000 n +0000000612 00000 n +0000000647 00000 n +trailer << + /Root 1 0 R + /Size 9 + /ID [<5ecb4bcc69402d31e10c2e63ec8500ee><5ecb4bcc69402d31e10c2e63ec8500ee>] + /QTest 8 0 R +>> +startxref +788 +%%EOF |