Commit c2e16827b69f3d3ac3721cfcd608b87f28e2a13f

Authored by Jay Berkenbilt
1 parent 52e024f7

Replace "file position" with "offset" in error messages

Sometimes it's an offset in an object stream or a content stream, so
file position is confusing in some cases.
Showing 108 changed files with 298 additions and 290 deletions
ChangeLog
1 1 2018-02-17 Jay Berkenbilt <ejb@ql.org>
2 2  
  3 + * Error message fix: replace "file position" with "offset" in
  4 + error messages that report lexical or parsing errors. Sometimes
  5 + it's an offset in an object stream or a content stream rather than
  6 + a file position, so this makes the error message less confusing in
  7 + those cases. It still requires some knowledge to find the exact
  8 + position of the error, since when it's not a file offset, it's
  9 + probably an offset into a stream after uncompressing it.
  10 +
3 11 * Error message fix: correct some cases in which the object that
4 12 contained a lexical error was omitted from the error message.
5 13  
... ...
libqpdf/QPDFExc.cc
... ... @@ -43,7 +43,7 @@ QPDFExc::createWhat(std::string const&amp; filename,
43 43 }
44 44 if (offset > 0)
45 45 {
46   - result += "file position " + QUtil::int_to_string(offset);
  46 + result += "offset " + QUtil::int_to_string(offset);
47 47 }
48 48 result += ")";
49 49 }
... ...
qpdf/qtest/qpdf/bad-data.out
1   -WARNING: bad-data.pdf (file position 319): error decoding stream data for object 4 0: LZWDecoder: bad code received
2   -WARNING: bad-data.pdf (file position 319): stream will be re-processed without filtering to avoid data loss
  1 +WARNING: bad-data.pdf (offset 319): error decoding stream data for object 4 0: LZWDecoder: bad code received
  2 +WARNING: bad-data.pdf (offset 319): stream will be re-processed without filtering to avoid data loss
3 3 qpdf: operation succeeded with warnings; resulting file may have some problems
... ...
qpdf/qtest/qpdf/bad-jpeg-check.out
... ... @@ -2,5 +2,5 @@ checking bad-jpeg.pdf
2 2 PDF Version: 1.3
3 3 File is not encrypted
4 4 File is not linearized
5   -WARNING: bad-jpeg.pdf (file position 735): error decoding stream data for object 6 0: Not a JPEG file: starts with 0x77 0x77
6   -WARNING: bad-jpeg.pdf (file position 735): stream will be re-processed without filtering to avoid data loss
  5 +WARNING: bad-jpeg.pdf (offset 735): error decoding stream data for object 6 0: Not a JPEG file: starts with 0x77 0x77
  6 +WARNING: bad-jpeg.pdf (offset 735): stream will be re-processed without filtering to avoid data loss
... ...
qpdf/qtest/qpdf/bad-jpeg-show.out
1   -WARNING: bad-jpeg.pdf (file position 735): error decoding stream data for object 6 0: Not a JPEG file: starts with 0x77 0x77
  1 +WARNING: bad-jpeg.pdf (offset 735): error decoding stream data for object 6 0: Not a JPEG file: starts with 0x77 0x77
2 2 qpdf: operation succeeded with warnings; resulting file may have some problems
... ...
qpdf/qtest/qpdf/bad-jpeg.out
1   -WARNING: bad-jpeg.pdf (file position 735): error decoding stream data for object 6 0: Not a JPEG file: starts with 0x77 0x77
2   -WARNING: bad-jpeg.pdf (file position 735): stream will be re-processed without filtering to avoid data loss
  1 +WARNING: bad-jpeg.pdf (offset 735): error decoding stream data for object 6 0: Not a JPEG file: starts with 0x77 0x77
  2 +WARNING: bad-jpeg.pdf (offset 735): stream will be re-processed without filtering to avoid data loss
3 3 qpdf: operation succeeded with warnings; resulting file may have some problems
... ...
qpdf/qtest/qpdf/bad-xref-entry-corrected.out
... ... @@ -3,7 +3,7 @@ PDF Version: 1.3
3 3 File is not encrypted
4 4 File is not linearized
5 5 WARNING: bad-xref-entry.pdf: file is damaged
6   -WARNING: bad-xref-entry.pdf (object 5 0, file position 580): expected n n obj
  6 +WARNING: bad-xref-entry.pdf (object 5 0, offset 580): expected n n obj
7 7 WARNING: bad-xref-entry.pdf: Attempting to reconstruct cross-reference table
8 8 1/0: uncompressed; offset = 52
9 9 2/0: uncompressed; offset = 133
... ...
qpdf/qtest/qpdf/bad10-recover.out
1 1 WARNING: bad10.pdf: file is damaged
2   -WARNING: bad10.pdf (trailer, file position 712): /Size key in trailer dictionary is not an integer
  2 +WARNING: bad10.pdf (trailer, offset 712): /Size key in trailer dictionary is not an integer
3 3 WARNING: bad10.pdf: Attempting to reconstruct cross-reference table
4 4 /QTest is implicit
5 5 /QTest is direct and has type null (2)
... ...
qpdf/qtest/qpdf/bad10.out
1   -bad10.pdf (trailer, file position 712): /Size key in trailer dictionary is not an integer
  1 +bad10.pdf (trailer, offset 712): /Size key in trailer dictionary is not an integer
... ...
qpdf/qtest/qpdf/bad11-recover.out
1 1 WARNING: bad11.pdf: file is damaged
2   -WARNING: bad11.pdf (trailer, file position 905): /Prev key in trailer dictionary is not an integer
  2 +WARNING: bad11.pdf (trailer, offset 905): /Prev key in trailer dictionary is not an integer
3 3 WARNING: bad11.pdf: Attempting to reconstruct cross-reference table
4 4 /QTest is implicit
5 5 /QTest is direct and has type null (2)
... ...
qpdf/qtest/qpdf/bad11.out
1   -bad11.pdf (trailer, file position 905): /Prev key in trailer dictionary is not an integer
  1 +bad11.pdf (trailer, offset 905): /Prev key in trailer dictionary is not an integer
... ...
qpdf/qtest/qpdf/bad13-recover.out
1   -WARNING: bad13.pdf (trailer, file position 753): treating unexpected brace token as null
  1 +WARNING: bad13.pdf (trailer, offset 753): treating unexpected brace token as null
2 2 /QTest is implicit
3 3 /QTest is direct and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad13.out
1   -WARNING: bad13.pdf (trailer, file position 753): treating unexpected brace token as null
  1 +WARNING: bad13.pdf (trailer, offset 753): treating unexpected brace token as null
2 2 /QTest is implicit
3 3 /QTest is direct and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad14-recover.out
1   -WARNING: bad14.pdf (trailer, file position 753): treating unexpected brace token as null
  1 +WARNING: bad14.pdf (trailer, offset 753): treating unexpected brace token as null
2 2 /QTest is implicit
3 3 /QTest is direct and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad14.out
1   -WARNING: bad14.pdf (trailer, file position 753): treating unexpected brace token as null
  1 +WARNING: bad14.pdf (trailer, offset 753): treating unexpected brace token as null
2 2 /QTest is implicit
3 3 /QTest is direct and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad15-recover.out
1   -WARNING: bad15.pdf (trailer, file position 753): treating unexpected array close token as null
  1 +WARNING: bad15.pdf (trailer, offset 753): treating unexpected array close token as null
2 2 /QTest is implicit
3 3 /QTest is direct and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad15.out
1   -WARNING: bad15.pdf (trailer, file position 753): treating unexpected array close token as null
  1 +WARNING: bad15.pdf (trailer, offset 753): treating unexpected array close token as null
2 2 /QTest is implicit
3 3 /QTest is direct and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad16-recover.out
1   -WARNING: bad16.pdf (trailer, file position 753): unexpected dictionary close token
2   -WARNING: bad16.pdf (trailer, file position 756): unexpected dictionary close token
3   -WARNING: bad16.pdf (trailer, file position 759): unknown token while reading object; treating as string
  1 +WARNING: bad16.pdf (trailer, offset 753): unexpected dictionary close token
  2 +WARNING: bad16.pdf (trailer, offset 756): unexpected dictionary close token
  3 +WARNING: bad16.pdf (trailer, offset 759): unknown token while reading object; treating as string
4 4 WARNING: bad16.pdf: file is damaged
5   -WARNING: bad16.pdf (trailer, file position 779): unexpected EOF
  5 +WARNING: bad16.pdf (trailer, offset 779): unexpected EOF
6 6 WARNING: bad16.pdf: Attempting to reconstruct cross-reference table
7   -WARNING: bad16.pdf (trailer, file position 753): unexpected dictionary close token
8   -WARNING: bad16.pdf (trailer, file position 756): unexpected dictionary close token
9   -WARNING: bad16.pdf (trailer, file position 759): unknown token while reading object; treating as string
10   -bad16.pdf (trailer, file position 779): unexpected EOF
  7 +WARNING: bad16.pdf (trailer, offset 753): unexpected dictionary close token
  8 +WARNING: bad16.pdf (trailer, offset 756): unexpected dictionary close token
  9 +WARNING: bad16.pdf (trailer, offset 759): unknown token while reading object; treating as string
  10 +bad16.pdf (trailer, offset 779): unexpected EOF
... ...
qpdf/qtest/qpdf/bad16.out
1   -WARNING: bad16.pdf (trailer, file position 753): unexpected dictionary close token
2   -WARNING: bad16.pdf (trailer, file position 756): unexpected dictionary close token
3   -WARNING: bad16.pdf (trailer, file position 759): unknown token while reading object; treating as string
4   -bad16.pdf (trailer, file position 779): unexpected EOF
  1 +WARNING: bad16.pdf (trailer, offset 753): unexpected dictionary close token
  2 +WARNING: bad16.pdf (trailer, offset 756): unexpected dictionary close token
  3 +WARNING: bad16.pdf (trailer, offset 759): unknown token while reading object; treating as string
  4 +bad16.pdf (trailer, offset 779): unexpected EOF
... ...
qpdf/qtest/qpdf/bad17-recover.out
1   -WARNING: bad17.pdf (trailer, file position 715): dictionary ended prematurely; using null as value for last key
  1 +WARNING: bad17.pdf (trailer, offset 715): dictionary ended prematurely; using null as value for last key
2 2 /QTest is implicit
3 3 /QTest is direct and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad17.out
1   -WARNING: bad17.pdf (trailer, file position 715): dictionary ended prematurely; using null as value for last key
  1 +WARNING: bad17.pdf (trailer, offset 715): dictionary ended prematurely; using null as value for last key
2 2 /QTest is implicit
3 3 /QTest is direct and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad18-recover.out
1 1 WARNING: bad18.pdf: file is damaged
2   -WARNING: bad18.pdf (trailer, file position 753): unexpected )
  2 +WARNING: bad18.pdf (trailer, offset 753): unexpected )
3 3 WARNING: bad18.pdf: Attempting to reconstruct cross-reference table
4   -bad18.pdf (trailer, file position 753): unexpected )
  4 +bad18.pdf (trailer, offset 753): unexpected )
... ...
qpdf/qtest/qpdf/bad18.out
1   -bad18.pdf (trailer, file position 753): unexpected )
  1 +bad18.pdf (trailer, offset 753): unexpected )
... ...
qpdf/qtest/qpdf/bad19-recover.out
1 1 WARNING: bad19.pdf: file is damaged
2   -WARNING: bad19.pdf (trailer, file position 753): unexpected >
  2 +WARNING: bad19.pdf (trailer, offset 753): unexpected >
3 3 WARNING: bad19.pdf: Attempting to reconstruct cross-reference table
4   -bad19.pdf (trailer, file position 753): unexpected >
  4 +bad19.pdf (trailer, offset 753): unexpected >
... ...
qpdf/qtest/qpdf/bad19.out
1   -bad19.pdf (trailer, file position 753): unexpected >
  1 +bad19.pdf (trailer, offset 753): unexpected >
... ...
qpdf/qtest/qpdf/bad20-recover.out
1 1 WARNING: bad20.pdf: file is damaged
2   -WARNING: bad20.pdf (trailer, file position 753): invalid character (q) in hexstring
  2 +WARNING: bad20.pdf (trailer, offset 753): invalid character (q) in hexstring
3 3 WARNING: bad20.pdf: Attempting to reconstruct cross-reference table
4   -bad20.pdf (trailer, file position 753): invalid character (q) in hexstring
  4 +bad20.pdf (trailer, offset 753): invalid character (q) in hexstring
... ...
qpdf/qtest/qpdf/bad20.out
1   -bad20.pdf (trailer, file position 753): invalid character (q) in hexstring
  1 +bad20.pdf (trailer, offset 753): invalid character (q) in hexstring
... ...
qpdf/qtest/qpdf/bad21-recover.out
1 1 WARNING: bad21.pdf: file is damaged
2   -WARNING: bad21.pdf (trailer, file position 742): invalid name token
  2 +WARNING: bad21.pdf (trailer, offset 742): invalid name token
3 3 WARNING: bad21.pdf: Attempting to reconstruct cross-reference table
4   -bad21.pdf (trailer, file position 742): invalid name token
  4 +bad21.pdf (trailer, offset 742): invalid name token
... ...
qpdf/qtest/qpdf/bad21.out
1   -bad21.pdf (trailer, file position 742): invalid name token
  1 +bad21.pdf (trailer, offset 742): invalid name token
... ...
qpdf/qtest/qpdf/bad22-recover.out
1   -WARNING: bad22.pdf (object 4 0, file position 314): stream dictionary lacks /Length key
2   -WARNING: bad22.pdf (object 4 0, file position 341): attempting to recover stream length
3   -WARNING: bad22.pdf (object 4 0, file position 341): recovered stream length: 44
  1 +WARNING: bad22.pdf (object 4 0, offset 314): stream dictionary lacks /Length key
  2 +WARNING: bad22.pdf (object 4 0, offset 341): attempting to recover stream length
  3 +WARNING: bad22.pdf (object 4 0, offset 341): recovered stream length: 44
4 4 /QTest is indirect and has type stream (10)
5 5 /QTest is a stream. Dictionary: << /Qength 44 >>
6 6 Raw stream data:
... ...
qpdf/qtest/qpdf/bad22.out
1   -WARNING: bad22.pdf (object 4 0, file position 314): stream dictionary lacks /Length key
  1 +WARNING: bad22.pdf (object 4 0, offset 314): stream dictionary lacks /Length key
2 2 /QTest is implicit
3 3 /QTest is indirect and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad23-recover.out
1   -WARNING: bad23.pdf (object 4 0, file position 314): /Length key in stream dictionary is not an integer
2   -WARNING: bad23.pdf (object 4 0, file position 341): attempting to recover stream length
3   -WARNING: bad23.pdf (object 4 0, file position 341): recovered stream length: 44
  1 +WARNING: bad23.pdf (object 4 0, offset 314): /Length key in stream dictionary is not an integer
  2 +WARNING: bad23.pdf (object 4 0, offset 341): attempting to recover stream length
  3 +WARNING: bad23.pdf (object 4 0, offset 341): recovered stream length: 44
4 4 /QTest is indirect and has type stream (10)
5 5 /QTest is a stream. Dictionary: << /Length () >>
6 6 Raw stream data:
... ...
qpdf/qtest/qpdf/bad23.out
1   -WARNING: bad23.pdf (object 4 0, file position 314): /Length key in stream dictionary is not an integer
  1 +WARNING: bad23.pdf (object 4 0, offset 314): /Length key in stream dictionary is not an integer
2 2 /QTest is implicit
3 3 /QTest is indirect and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad24-recover.out
1   -WARNING: bad24.pdf (object 4 0, file position 385): expected endstream
2   -WARNING: bad24.pdf (object 4 0, file position 341): attempting to recover stream length
3   -WARNING: bad24.pdf (object 4 0, file position 341): recovered stream length: 54
  1 +WARNING: bad24.pdf (object 4 0, offset 385): expected endstream
  2 +WARNING: bad24.pdf (object 4 0, offset 341): attempting to recover stream length
  3 +WARNING: bad24.pdf (object 4 0, offset 341): recovered stream length: 54
4 4 /QTest is indirect and has type stream (10)
5 5 /QTest is a stream. Dictionary: << /Length 44 >>
6 6 Raw stream data:
... ...
qpdf/qtest/qpdf/bad24.out
1   -WARNING: bad24.pdf (object 4 0, file position 385): expected endstream
  1 +WARNING: bad24.pdf (object 4 0, offset 385): expected endstream
2 2 /QTest is implicit
3 3 /QTest is indirect and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad25-recover.out
1 1 WARNING: bad25.pdf: file is damaged
2   -WARNING: bad25.pdf (object 4 0, file position 307): expected n n obj
  2 +WARNING: bad25.pdf (object 4 0, offset 307): expected n n obj
3 3 WARNING: bad25.pdf: Attempting to reconstruct cross-reference table
4 4 WARNING: bad25.pdf: object 4 0 not found in file after regenerating cross reference table
5 5 /QTest is implicit
... ...
qpdf/qtest/qpdf/bad25.out
1   -WARNING: bad25.pdf (object 4 0, file position 307): expected n n obj
  1 +WARNING: bad25.pdf (object 4 0, offset 307): expected n n obj
2 2 /QTest is implicit
3 3 /QTest is indirect and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad26-recover.out
1 1 WARNING: bad26.pdf: file is damaged
2   -WARNING: bad26.pdf (object 4 0, file position 307): expected n n obj
  2 +WARNING: bad26.pdf (object 4 0, offset 307): expected n n obj
3 3 WARNING: bad26.pdf: Attempting to reconstruct cross-reference table
4 4 WARNING: bad26.pdf: object 4 0 not found in file after regenerating cross reference table
5 5 /QTest is implicit
... ...
qpdf/qtest/qpdf/bad26.out
1   -WARNING: bad26.pdf (object 4 0, file position 307): expected n n obj
  1 +WARNING: bad26.pdf (object 4 0, offset 307): expected n n obj
2 2 /QTest is implicit
3 3 /QTest is indirect and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad27-recover.out
1 1 WARNING: bad27.pdf: file is damaged
2   -WARNING: bad27.pdf (object 4 0, file position 307): expected n n obj
  2 +WARNING: bad27.pdf (object 4 0, offset 307): expected n n obj
3 3 WARNING: bad27.pdf: Attempting to reconstruct cross-reference table
4 4 WARNING: bad27.pdf: object 4 0 not found in file after regenerating cross reference table
5 5 /QTest is implicit
... ...
qpdf/qtest/qpdf/bad27.out
1   -WARNING: bad27.pdf (object 4 0, file position 307): expected n n obj
  1 +WARNING: bad27.pdf (object 4 0, offset 307): expected n n obj
2 2 /QTest is implicit
3 3 /QTest is indirect and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad28-recover.out
1   -WARNING: bad28.pdf (object 4 0, file position 395): expected endobj
  1 +WARNING: bad28.pdf (object 4 0, offset 395): expected endobj
2 2 /QTest is indirect and has type stream (10)
3 3 /QTest is a stream. Dictionary: << /Length 44 >>
4 4 Raw stream data:
... ...
qpdf/qtest/qpdf/bad28.out
1   -WARNING: bad28.pdf (object 4 0, file position 395): expected endobj
  1 +WARNING: bad28.pdf (object 4 0, offset 395): expected endobj
2 2 /QTest is indirect and has type stream (10)
3 3 /QTest is a stream. Dictionary: << /Length 44 >>
4 4 Raw stream data:
... ...
qpdf/qtest/qpdf/bad29-recover.out
1 1 WARNING: bad29.pdf: file is damaged
2   -WARNING: bad29.pdf (trailer, file position 742): null character not allowed in name token
  2 +WARNING: bad29.pdf (trailer, offset 742): null character not allowed in name token
3 3 WARNING: bad29.pdf: Attempting to reconstruct cross-reference table
4   -bad29.pdf (trailer, file position 742): null character not allowed in name token
  4 +bad29.pdf (trailer, offset 742): null character not allowed in name token
... ...
qpdf/qtest/qpdf/bad29.out
1   -bad29.pdf (trailer, file position 742): null character not allowed in name token
  1 +bad29.pdf (trailer, offset 742): null character not allowed in name token
... ...
qpdf/qtest/qpdf/bad3-recover.out
1 1 WARNING: bad3.pdf: file is damaged
2   -WARNING: bad3.pdf (file position 542): xref not found
  2 +WARNING: bad3.pdf (offset 542): xref not found
3 3 WARNING: bad3.pdf: Attempting to reconstruct cross-reference table
4 4 /QTest is implicit
5 5 /QTest is direct and has type null (2)
... ...
qpdf/qtest/qpdf/bad3.out
1   -bad3.pdf (file position 542): xref not found
  1 +bad3.pdf (offset 542): xref not found
... ...
qpdf/qtest/qpdf/bad30-recover.out
No preview for this file type
qpdf/qtest/qpdf/bad30.out
No preview for this file type
qpdf/qtest/qpdf/bad32-recover.out
1 1 WARNING: bad32.pdf: file is damaged
2   -WARNING: bad32.pdf (object 4 0, file position 307): expected 4 0 obj
  2 +WARNING: bad32.pdf (object 4 0, offset 307): expected 4 0 obj
3 3 WARNING: bad32.pdf: Attempting to reconstruct cross-reference table
4 4 WARNING: bad32.pdf: object 4 0 not found in file after regenerating cross reference table
5 5 /QTest is implicit
... ...
qpdf/qtest/qpdf/bad32.out
1   -WARNING: bad32.pdf (object 4 0, file position 307): expected 4 0 obj
  1 +WARNING: bad32.pdf (object 4 0, offset 307): expected 4 0 obj
2 2 /QTest is implicit
3 3 /QTest is indirect and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad33-recover.out
No preview for this file type
qpdf/qtest/qpdf/bad33.out
1   -bad33.pdf (file position 1771): xref not found
  1 +bad33.pdf (offset 1771): xref not found
... ...
qpdf/qtest/qpdf/bad34-recover.out
1 1 WARNING: bad34.pdf: file is damaged
2   -WARNING: bad34.pdf (object 4 0, file position 322): expected n n obj
  2 +WARNING: bad34.pdf (object 4 0, offset 322): expected n n obj
3 3 WARNING: bad34.pdf: Attempting to reconstruct cross-reference table
4 4 /QTest is indirect and has type stream (10)
5 5 /QTest is a stream. Dictionary: << /Length 44 /Quack 9 0 R >>
... ...
qpdf/qtest/qpdf/bad34.out
1   -WARNING: bad34.pdf (object 4 0, file position 322): expected n n obj
  1 +WARNING: bad34.pdf (object 4 0, offset 322): expected n n obj
2 2 /QTest is implicit
3 3 /QTest is indirect and has type null (2)
4 4 /QTest is null
... ...
qpdf/qtest/qpdf/bad35-recover.out
1   -WARNING: bad35.pdf (object 1 0, file position 521): supposed object stream 1 has wrong type
2   -bad35.pdf (file position 521): unable to find /Root dictionary
  1 +WARNING: bad35.pdf (object 1 0, offset 521): supposed object stream 1 has wrong type
  2 +bad35.pdf (offset 521): unable to find /Root dictionary
... ...
qpdf/qtest/qpdf/bad35.out
1   -WARNING: bad35.pdf (object 1 0, file position 521): supposed object stream 1 has wrong type
2   -bad35.pdf (file position 521): unable to find /Root dictionary
  1 +WARNING: bad35.pdf (object 1 0, offset 521): supposed object stream 1 has wrong type
  2 +bad35.pdf (offset 521): unable to find /Root dictionary
... ...
qpdf/qtest/qpdf/bad36-recover.out
1   -WARNING: bad36.pdf (trailer, file position 764): unknown token while reading object; treating as string
2   -WARNING: bad36.pdf (trailer, file position 715): expected dictionary key but found non-name object; inserting key /QPDFFake2
3   -WARNING: bad36.pdf (trailer, file position 715): dictionary ended prematurely; using null as value for last key
  1 +WARNING: bad36.pdf (trailer, offset 764): unknown token while reading object; treating as string
  2 +WARNING: bad36.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake2
  3 +WARNING: bad36.pdf (trailer, offset 715): dictionary ended prematurely; using null as value for last key
4 4 /QTest is implicit
5 5 /QTest is direct and has type null (2)
6 6 /QTest is null
... ...
qpdf/qtest/qpdf/bad36.out
1   -WARNING: bad36.pdf (trailer, file position 764): unknown token while reading object; treating as string
2   -WARNING: bad36.pdf (trailer, file position 715): expected dictionary key but found non-name object; inserting key /QPDFFake2
3   -WARNING: bad36.pdf (trailer, file position 715): dictionary ended prematurely; using null as value for last key
  1 +WARNING: bad36.pdf (trailer, offset 764): unknown token while reading object; treating as string
  2 +WARNING: bad36.pdf (trailer, offset 715): expected dictionary key but found non-name object; inserting key /QPDFFake2
  3 +WARNING: bad36.pdf (trailer, offset 715): dictionary ended prematurely; using null as value for last key
4 4 /QTest is implicit
5 5 /QTest is direct and has type null (2)
6 6 /QTest is null
... ...
qpdf/qtest/qpdf/bad4-recover.out
1 1 WARNING: bad4.pdf: file is damaged
2   -WARNING: bad4.pdf (xref table, file position 547): xref syntax invalid
  2 +WARNING: bad4.pdf (xref table, offset 547): xref syntax invalid
3 3 WARNING: bad4.pdf: Attempting to reconstruct cross-reference table
4 4 /QTest is implicit
5 5 /QTest is direct and has type null (2)
... ...
qpdf/qtest/qpdf/bad4.out
1   -bad4.pdf (xref table, file position 547): xref syntax invalid
  1 +bad4.pdf (xref table, offset 547): xref syntax invalid
... ...
qpdf/qtest/qpdf/bad5-recover.out
1 1 WARNING: bad5.pdf: file is damaged
2   -WARNING: bad5.pdf (xref table, file position 591): invalid xref entry (obj=2)
  2 +WARNING: bad5.pdf (xref table, offset 591): invalid xref entry (obj=2)
3 3 WARNING: bad5.pdf: Attempting to reconstruct cross-reference table
4 4 /QTest is implicit
5 5 /QTest is direct and has type null (2)
... ...
qpdf/qtest/qpdf/bad5.out
1   -bad5.pdf (xref table, file position 591): invalid xref entry (obj=2)
  1 +bad5.pdf (xref table, offset 591): invalid xref entry (obj=2)
... ...
qpdf/qtest/qpdf/bad7-recover.out
1 1 WARNING: bad7.pdf: file is damaged
2   -WARNING: bad7.pdf (file position 698): expected trailer dictionary
  2 +WARNING: bad7.pdf (offset 698): expected trailer dictionary
3 3 WARNING: bad7.pdf: Attempting to reconstruct cross-reference table
4 4 bad7.pdf: unable to find trailer dictionary while recovering damaged file
... ...
qpdf/qtest/qpdf/bad7.out
1   -bad7.pdf (file position 698): expected trailer dictionary
  1 +bad7.pdf (offset 698): expected trailer dictionary
... ...
qpdf/qtest/qpdf/bad8-recover.out
1 1 WARNING: bad8.pdf: file is damaged
2   -WARNING: bad8.pdf (file position 543): xref not found
  2 +WARNING: bad8.pdf (offset 543): xref not found
3 3 WARNING: bad8.pdf: Attempting to reconstruct cross-reference table
4 4 /QTest is implicit
5 5 /QTest is direct and has type null (2)
... ...
qpdf/qtest/qpdf/bad8.out
1   -bad8.pdf (file position 543): xref not found
  1 +bad8.pdf (offset 543): xref not found
... ...
qpdf/qtest/qpdf/bad9-recover.out
1 1 WARNING: bad9.pdf: file is damaged
2   -WARNING: bad9.pdf (trailer, file position 712): trailer dictionary lacks /Size key
  2 +WARNING: bad9.pdf (trailer, offset 712): trailer dictionary lacks /Size key
3 3 WARNING: bad9.pdf: Attempting to reconstruct cross-reference table
4 4 /QTest is implicit
5 5 /QTest is direct and has type null (2)
... ...
qpdf/qtest/qpdf/bad9.out
1   -bad9.pdf (trailer, file position 712): trailer dictionary lacks /Size key
  1 +bad9.pdf (trailer, offset 712): trailer dictionary lacks /Size key
... ...
qpdf/qtest/qpdf/c-no-recovery.out
1   -error: bad33.pdf (file position 1771): xref not found
  1 +error: bad33.pdf (offset 1771): xref not found
2 2 code: 5
3 3 file: bad33.pdf
4 4 pos : 1771
... ...
qpdf/qtest/qpdf/c-write-warnings.out
... ... @@ -3,7 +3,7 @@ warning: bad33.pdf: file is damaged
3 3 file: bad33.pdf
4 4 pos : 0
5 5 text: file is damaged
6   -warning: bad33.pdf (file position 1771): xref not found
  6 +warning: bad33.pdf (offset 1771): xref not found
7 7 code: 5
8 8 file: bad33.pdf
9 9 pos : 1771
... ... @@ -13,7 +13,7 @@ warning: bad33.pdf: Attempting to reconstruct cross-reference table
13 13 file: bad33.pdf
14 14 pos : 0
15 15 text: Attempting to reconstruct cross-reference table
16   -warning: bad33.pdf (file position 629): stream filter type is not name or array
  16 +warning: bad33.pdf (offset 629): stream filter type is not name or array
17 17 code: 5
18 18 file: bad33.pdf
19 19 pos : 629
... ...
qpdf/qtest/qpdf/content-stream-errors.out
... ... @@ -2,6 +2,6 @@ checking content-stream-errors.pdf
2 2 PDF Version: 1.3
3 3 File is not encrypted
4 4 File is not linearized
5   -page 1: page object 3 0 stream 7 0 (content, file position 52): parse error while reading object
6   -page 3: page object 5 0 stream 15 0 (stream data, file position 117): EOF found while reading inline image
7   -page 4: page object 6 0 stream 19 0 (content, file position 53): parse error while reading object
  5 +page 1: page object 3 0 stream 7 0 (content, offset 52): parse error while reading object
  6 +page 3: page object 5 0 stream 15 0 (stream data, offset 117): EOF found while reading inline image
  7 +page 4: page object 6 0 stream 19 0 (content, offset 53): parse error while reading object
... ...
qpdf/qtest/qpdf/damaged-stream-c-check.out
1   -warning: damaged-stream.pdf (file position 426): error decoding stream data for object 5 0: LZWDecoder: bad code received
  1 +warning: damaged-stream.pdf (offset 426): error decoding stream data for object 5 0: LZWDecoder: bad code received
2 2 code: 5
3 3 file: damaged-stream.pdf
4 4 pos : 426
5 5 text: error decoding stream data for object 5 0: LZWDecoder: bad code received
6   -warning: damaged-stream.pdf (file position 426): stream will be re-processed without filtering to avoid data loss
  6 +warning: damaged-stream.pdf (offset 426): stream will be re-processed without filtering to avoid data loss
7 7 code: 5
8 8 file: damaged-stream.pdf
9 9 pos : 426
... ...
qpdf/qtest/qpdf/damaged-stream.out
... ... @@ -2,5 +2,5 @@ checking damaged-stream.pdf
2 2 PDF Version: 1.3
3 3 File is not encrypted
4 4 File is not linearized
5   -WARNING: damaged-stream.pdf (file position 426): error decoding stream data for object 5 0: LZWDecoder: bad code received
6   -WARNING: damaged-stream.pdf (file position 426): stream will be re-processed without filtering to avoid data loss
  5 +WARNING: damaged-stream.pdf (offset 426): error decoding stream data for object 5 0: LZWDecoder: bad code received
  6 +WARNING: damaged-stream.pdf (offset 426): stream will be re-processed without filtering to avoid data loss
... ...
qpdf/qtest/qpdf/empty-object.out
1   -WARNING: empty-object.pdf (object 7 0, file position 575): empty object treated as null
  1 +WARNING: empty-object.pdf (object 7 0, offset 575): empty object treated as null
2 2 null
3 3 qpdf: operation succeeded with warnings; resulting file may have some problems
... ...
qpdf/qtest/qpdf/eof-in-inline-image.out
... ... @@ -22,4 +22,4 @@ name: /Fl
22 22 name: /DP
23 23 dictionary: << /Columns 1 /Predictor 15 >>
24 24 operator: ID
25   -page object 3 0 stream 4 0 (stream data, file position 139): EOF found while reading inline image
  25 +page object 3 0 stream 4 0 (stream data, offset 139): EOF found while reading inline image
... ...
qpdf/qtest/qpdf/eof-reading-token.out
... ... @@ -2,4 +2,4 @@ checking eof-reading-token.pdf
2 2 PDF Version: 1.3
3 3 File is not encrypted
4 4 File is not linearized
5   -WARNING: eof-reading-token.pdf object stream 12 (object 13 0, file position 5): EOF while reading token
  5 +WARNING: eof-reading-token.pdf object stream 12 (object 13 0, offset 5): EOF while reading token
... ...
qpdf/qtest/qpdf/good14.out
... ... @@ -13,8 +13,8 @@ three lines
13 13 <8a8b>
14 14 (ab)
15 15 <8c><dd> ) >
16   -<610062> (MOO)WARNING: good14.pdf (file position 628): content normalization encountered bad tokens
17   -WARNING: good14.pdf (file position 628): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
  16 +<610062> (MOO)WARNING: good14.pdf (offset 628): content normalization encountered bad tokens
  17 +WARNING: good14.pdf (offset 628): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
18 18 -- stream 1 --
19 19 This stream does end with a newline.
20 20 // tests:
... ... @@ -33,17 +33,17 @@ This stream does end with a newline.
33 33  
34 34 /good name
35 35 /bad#00name
36   -WARNING: good14.pdf (file position 860): content normalization encountered bad tokens
37   -WARNING: good14.pdf (file position 860): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
  36 +WARNING: good14.pdf (offset 860): content normalization encountered bad tokens
  37 +WARNING: good14.pdf (offset 860): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
38 38 -- stream 2 --
39 39 (This stream ends with a \001 bad token
40   -WARNING: good14.pdf (file position 1316): content normalization encountered bad tokens
41   -WARNING: good14.pdf (file position 1316): normalized content ended with a bad token; you may be able to resolve this by coalescing content streams in combination with normalizing content. From the command line, specify --coalesce-contents
42   -WARNING: good14.pdf (file position 1316): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
  40 +WARNING: good14.pdf (offset 1316): content normalization encountered bad tokens
  41 +WARNING: good14.pdf (offset 1316): normalized content ended with a bad token; you may be able to resolve this by coalescing content streams in combination with normalizing content. From the command line, specify --coalesce-contents
  42 +WARNING: good14.pdf (offset 1316): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
43 43 -- stream 3 --
44   -<AB XWARNING: good14.pdf (file position 1406): content normalization encountered bad tokens
45   -WARNING: good14.pdf (file position 1406): normalized content ended with a bad token; you may be able to resolve this by coalescing content streams in combination with normalizing content. From the command line, specify --coalesce-contents
46   -WARNING: good14.pdf (file position 1406): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
  44 +<AB XWARNING: good14.pdf (offset 1406): content normalization encountered bad tokens
  45 +WARNING: good14.pdf (offset 1406): normalized content ended with a bad token; you may be able to resolve this by coalescing content streams in combination with normalizing content. From the command line, specify --coalesce-contents
  46 +WARNING: good14.pdf (offset 1406): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
47 47 -- stream 4 --
48 48 (ends with a name)
49 49 /ThisMustBeLast-- stream 5 --
... ... @@ -54,7 +54,7 @@ BI
54 54 ID
55 55 <506f7
56 56 461746f>
57   -WARNING: good14.pdf (file position 1549): content normalization encountered bad tokens
58   -WARNING: good14.pdf (file position 1549): normalized content ended with a bad token; you may be able to resolve this by coalescing content streams in combination with normalizing content. From the command line, specify --coalesce-contents
59   -WARNING: good14.pdf (file position 1549): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
  57 +WARNING: good14.pdf (offset 1549): content normalization encountered bad tokens
  58 +WARNING: good14.pdf (offset 1549): normalized content ended with a bad token; you may be able to resolve this by coalescing content streams in combination with normalizing content. From the command line, specify --coalesce-contents
  59 +WARNING: good14.pdf (offset 1549): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
60 60 test 3 done
... ...
qpdf/qtest/qpdf/indirect-r-arg.out
1   -WARNING: indirect-r-arg.pdf (object 1 0, file position 76): unknown token while reading object; treating as string
2   -WARNING: indirect-r-arg.pdf (object 1 0, file position 62): expected dictionary key but found non-name object; inserting key /QPDFFake1
3   -WARNING: indirect-r-arg.pdf (object 1 0, file position 62): expected dictionary key but found non-name object; inserting key /QPDFFake2
  1 +WARNING: indirect-r-arg.pdf (object 1 0, offset 76): unknown token while reading object; treating as string
  2 +WARNING: indirect-r-arg.pdf (object 1 0, offset 62): expected dictionary key but found non-name object; inserting key /QPDFFake1
  3 +WARNING: indirect-r-arg.pdf (object 1 0, offset 62): expected dictionary key but found non-name object; inserting key /QPDFFake2
4 4 checking indirect-r-arg.pdf
5 5 PDF Version: 1.3
6 6 File is not encrypted
... ...
qpdf/qtest/qpdf/invalid-id-xref.out
1   -WARNING: invalid-id-xref.pdf (trailer, file position 731): invalid /ID in trailer dictionary
  1 +WARNING: invalid-id-xref.pdf (trailer, offset 731): invalid /ID in trailer dictionary
2 2 checking invalid-id-xref.pdf
3 3 PDF Version: 1.4
4 4 R = 3
... ...
qpdf/qtest/qpdf/issue-100.out
1 1 WARNING: issue-100.pdf: file is damaged
2   -WARNING: issue-100.pdf (file position 736): xref not found
  2 +WARNING: issue-100.pdf (offset 736): xref not found
3 3 WARNING: issue-100.pdf: Attempting to reconstruct cross-reference table
4   -WARNING: issue-100.pdf (object 5 0, file position 268): unknown token while reading object; treating as string
5   -WARNING: issue-100.pdf (object 5 0, file position 286): unknown token while reading object; treating as string
6   -WARNING: issue-100.pdf (object 5 0, file position 289): unknown token while reading object; treating as string
7   -WARNING: issue-100.pdf (object 5 0, file position 294): unknown token while reading object; treating as string
8   -WARNING: issue-100.pdf (object 5 0, file position 297): unknown token while reading object; treating as string
9   -WARNING: issue-100.pdf (object 5 0, file position 304): unknown token while reading object; treating as string
10   -WARNING: issue-100.pdf (object 5 0, file position 308): unexpected )
11   -WARNING: issue-100.pdf (object 5 0, file position 418): /Length key in stream dictionary is not an integer
12   -WARNING: issue-100.pdf (object 5 0, file position 489): attempting to recover stream length
13   -WARNING: issue-100.pdf (object 5 0, file position 489): recovered stream length: 12
14   -WARNING: issue-100.pdf (trailer, file position 953): expected dictionary key but found non-name object; inserting key /QPDFFake1
15   -WARNING: issue-100.pdf (trailer, file position 953): dictionary ended prematurely; using null as value for last key
16   -issue-100.pdf (file position 1144): unable to find /Root dictionary
  4 +WARNING: issue-100.pdf (object 5 0, offset 268): unknown token while reading object; treating as string
  5 +WARNING: issue-100.pdf (object 5 0, offset 286): unknown token while reading object; treating as string
  6 +WARNING: issue-100.pdf (object 5 0, offset 289): unknown token while reading object; treating as string
  7 +WARNING: issue-100.pdf (object 5 0, offset 294): unknown token while reading object; treating as string
  8 +WARNING: issue-100.pdf (object 5 0, offset 297): unknown token while reading object; treating as string
  9 +WARNING: issue-100.pdf (object 5 0, offset 304): unknown token while reading object; treating as string
  10 +WARNING: issue-100.pdf (object 5 0, offset 308): unexpected )
  11 +WARNING: issue-100.pdf (object 5 0, offset 418): /Length key in stream dictionary is not an integer
  12 +WARNING: issue-100.pdf (object 5 0, offset 489): attempting to recover stream length
  13 +WARNING: issue-100.pdf (object 5 0, offset 489): recovered stream length: 12
  14 +WARNING: issue-100.pdf (trailer, offset 953): expected dictionary key but found non-name object; inserting key /QPDFFake1
  15 +WARNING: issue-100.pdf (trailer, offset 953): dictionary ended prematurely; using null as value for last key
  16 +issue-100.pdf (offset 1144): unable to find /Root dictionary
... ...
qpdf/qtest/qpdf/issue-101.out
1 1 WARNING: issue-101.pdf: file is damaged
2   -WARNING: issue-101.pdf (file position 3526): xref not found
  2 +WARNING: issue-101.pdf (offset 3526): xref not found
3 3 WARNING: issue-101.pdf: Attempting to reconstruct cross-reference table
4   -WARNING: issue-101.pdf (object 5 0, file position 1242): expected dictionary key but found non-name object; inserting key /QPDFFake1
5   -WARNING: issue-101.pdf (object 5 0, file position 1242): dictionary ended prematurely; using null as value for last key
6   -WARNING: issue-101.pdf (object 5 0, file position 1438): /Length key in stream dictionary is not an integer
7   -WARNING: issue-101.pdf (object 5 0, file position 1509): attempting to recover stream length
8   -WARNING: issue-101.pdf (object 5 0, file position 1509): recovered stream length: 8
9   -WARNING: issue-101.pdf (trailer, file position 1631): /Length key in stream dictionary is not an integer
10   -WARNING: issue-101.pdf (trailer, file position 1702): attempting to recover stream length
11   -WARNING: issue-101.pdf (trailer, file position 1702): recovered stream length: 12
12   -WARNING: issue-101.pdf (trailer, file position 2026): /Length key in stream dictionary is not an integer
13   -WARNING: issue-101.pdf (trailer, file position 2097): attempting to recover stream length
14   -WARNING: issue-101.pdf (trailer, file position 2097): recovered stream length: 257
15   -WARNING: issue-101.pdf (trailer, file position 2613): /Length key in stream dictionary is not an integer
16   -WARNING: issue-101.pdf (trailer, file position 2684): attempting to recover stream length
17   -WARNING: issue-101.pdf (trailer, file position 2684): recovered stream length: 74
18   -WARNING: issue-101.pdf (trailer, file position 2928): unknown token while reading object; treating as string
19   -WARNING: issue-101.pdf (trailer, file position 2930): unknown token while reading object; treating as string
20   -WARNING: issue-101.pdf (trailer, file position 2928): expected dictionary key but found non-name object; inserting key /QPDFFake1
21   -WARNING: issue-101.pdf (trailer, file position 2928): expected dictionary key but found non-name object; inserting key /QPDFFake2
22   -WARNING: issue-101.pdf (trailer, file position 2928): expected dictionary key but found non-name object; inserting key /QPDFFake3
23   -WARNING: issue-101.pdf (trailer, file position 2925): /Length key in stream dictionary is not an integer
24   -WARNING: issue-101.pdf (trailer, file position 2996): attempting to recover stream length
25   -WARNING: issue-101.pdf (trailer, file position 2996): recovered stream length: 12
26   -WARNING: issue-101.pdf (trailer, file position 3339): /Length key in stream dictionary is not an integer
27   -WARNING: issue-101.pdf (trailer, file position 3410): attempting to recover stream length
28   -WARNING: issue-101.pdf (trailer, file position 3410): recovered stream length: 12
29   -WARNING: issue-101.pdf (trailer, file position 3560): /Length key in stream dictionary is not an integer
30   -WARNING: issue-101.pdf (trailer, file position 3631): attempting to recover stream length
31   -WARNING: issue-101.pdf (trailer, file position 3631): recovered stream length: 8
32   -WARNING: issue-101.pdf (trailer, file position 4113): /Length key in stream dictionary is not an integer
33   -WARNING: issue-101.pdf (trailer, file position 4184): attempting to recover stream length
34   -WARNING: issue-101.pdf (trailer, file position 4184): recovered stream length: 8
35   -WARNING: issue-101.pdf (object 11 0, file position 591): unknown token while reading object; treating as string
36   -WARNING: issue-101.pdf (object 11 0, file position 625): treating unexpected brace token as null
37   -WARNING: issue-101.pdf (object 11 0, file position 626): unknown token while reading object; treating as string
38   -WARNING: issue-101.pdf (object 11 0, file position 637): unknown token while reading object; treating as string
39   -WARNING: issue-101.pdf (object 11 0, file position 639): unknown token while reading object; treating as string
40   -WARNING: issue-101.pdf (object 11 0, file position 644): unknown token while reading object; treating as string
41   -WARNING: issue-101.pdf (object 11 0, file position 647): unknown token while reading object; treating as string
42   -WARNING: issue-101.pdf (object 11 0, file position 687): unknown token while reading object; treating as string
43   -WARNING: issue-101.pdf (object 11 0, file position 691): unknown token while reading object; treating as string
44   -WARNING: issue-101.pdf (object 11 0, file position 696): unknown token while reading object; treating as string
45   -WARNING: issue-101.pdf (object 11 0, file position 698): unknown token while reading object; treating as string
46   -WARNING: issue-101.pdf (object 11 0, file position 701): unknown token while reading object; treating as string
47   -WARNING: issue-101.pdf (object 11 0, file position 711): unknown token while reading object; treating as string
48   -WARNING: issue-101.pdf (object 11 0, file position 743): unknown token while reading object; treating as string
49   -WARNING: issue-101.pdf (object 11 0, file position 745): unknown token while reading object; treating as string
50   -WARNING: issue-101.pdf (object 11 0, file position 747): unknown token while reading object; treating as string
51   -WARNING: issue-101.pdf (object 11 0, file position 777): unknown token while reading object; treating as string
52   -WARNING: issue-101.pdf (object 11 0, file position 790): unknown token while reading object; treating as string
53   -WARNING: issue-101.pdf (object 11 0, file position 800): treating unexpected brace token as null
54   -WARNING: issue-101.pdf (object 11 0, file position 801): unknown token while reading object; treating as string
55   -WARNING: issue-101.pdf (object 11 0, file position 811): unknown token while reading object; treating as string
56   -WARNING: issue-101.pdf (object 11 0, file position 819): unknown token while reading object; treating as string
57   -WARNING: issue-101.pdf (object 11 0, file position 832): unknown token while reading object; treating as string
58   -WARNING: issue-101.pdf (object 11 0, file position 856): unexpected >
59   -issue-101.pdf (file position 856): unable to find /Root dictionary
  4 +WARNING: issue-101.pdf (object 5 0, offset 1242): expected dictionary key but found non-name object; inserting key /QPDFFake1
  5 +WARNING: issue-101.pdf (object 5 0, offset 1242): dictionary ended prematurely; using null as value for last key
  6 +WARNING: issue-101.pdf (object 5 0, offset 1438): /Length key in stream dictionary is not an integer
  7 +WARNING: issue-101.pdf (object 5 0, offset 1509): attempting to recover stream length
  8 +WARNING: issue-101.pdf (object 5 0, offset 1509): recovered stream length: 8
  9 +WARNING: issue-101.pdf (trailer, offset 1631): /Length key in stream dictionary is not an integer
  10 +WARNING: issue-101.pdf (trailer, offset 1702): attempting to recover stream length
  11 +WARNING: issue-101.pdf (trailer, offset 1702): recovered stream length: 12
  12 +WARNING: issue-101.pdf (trailer, offset 2026): /Length key in stream dictionary is not an integer
  13 +WARNING: issue-101.pdf (trailer, offset 2097): attempting to recover stream length
  14 +WARNING: issue-101.pdf (trailer, offset 2097): recovered stream length: 257
  15 +WARNING: issue-101.pdf (trailer, offset 2613): /Length key in stream dictionary is not an integer
  16 +WARNING: issue-101.pdf (trailer, offset 2684): attempting to recover stream length
  17 +WARNING: issue-101.pdf (trailer, offset 2684): recovered stream length: 74
  18 +WARNING: issue-101.pdf (trailer, offset 2928): unknown token while reading object; treating as string
  19 +WARNING: issue-101.pdf (trailer, offset 2930): unknown token while reading object; treating as string
  20 +WARNING: issue-101.pdf (trailer, offset 2928): expected dictionary key but found non-name object; inserting key /QPDFFake1
  21 +WARNING: issue-101.pdf (trailer, offset 2928): expected dictionary key but found non-name object; inserting key /QPDFFake2
  22 +WARNING: issue-101.pdf (trailer, offset 2928): expected dictionary key but found non-name object; inserting key /QPDFFake3
  23 +WARNING: issue-101.pdf (trailer, offset 2925): /Length key in stream dictionary is not an integer
  24 +WARNING: issue-101.pdf (trailer, offset 2996): attempting to recover stream length
  25 +WARNING: issue-101.pdf (trailer, offset 2996): recovered stream length: 12
  26 +WARNING: issue-101.pdf (trailer, offset 3339): /Length key in stream dictionary is not an integer
  27 +WARNING: issue-101.pdf (trailer, offset 3410): attempting to recover stream length
  28 +WARNING: issue-101.pdf (trailer, offset 3410): recovered stream length: 12
  29 +WARNING: issue-101.pdf (trailer, offset 3560): /Length key in stream dictionary is not an integer
  30 +WARNING: issue-101.pdf (trailer, offset 3631): attempting to recover stream length
  31 +WARNING: issue-101.pdf (trailer, offset 3631): recovered stream length: 8
  32 +WARNING: issue-101.pdf (trailer, offset 4113): /Length key in stream dictionary is not an integer
  33 +WARNING: issue-101.pdf (trailer, offset 4184): attempting to recover stream length
  34 +WARNING: issue-101.pdf (trailer, offset 4184): recovered stream length: 8
  35 +WARNING: issue-101.pdf (object 11 0, offset 591): unknown token while reading object; treating as string
  36 +WARNING: issue-101.pdf (object 11 0, offset 625): treating unexpected brace token as null
  37 +WARNING: issue-101.pdf (object 11 0, offset 626): unknown token while reading object; treating as string
  38 +WARNING: issue-101.pdf (object 11 0, offset 637): unknown token while reading object; treating as string
  39 +WARNING: issue-101.pdf (object 11 0, offset 639): unknown token while reading object; treating as string
  40 +WARNING: issue-101.pdf (object 11 0, offset 644): unknown token while reading object; treating as string
  41 +WARNING: issue-101.pdf (object 11 0, offset 647): unknown token while reading object; treating as string
  42 +WARNING: issue-101.pdf (object 11 0, offset 687): unknown token while reading object; treating as string
  43 +WARNING: issue-101.pdf (object 11 0, offset 691): unknown token while reading object; treating as string
  44 +WARNING: issue-101.pdf (object 11 0, offset 696): unknown token while reading object; treating as string
  45 +WARNING: issue-101.pdf (object 11 0, offset 698): unknown token while reading object; treating as string
  46 +WARNING: issue-101.pdf (object 11 0, offset 701): unknown token while reading object; treating as string
  47 +WARNING: issue-101.pdf (object 11 0, offset 711): unknown token while reading object; treating as string
  48 +WARNING: issue-101.pdf (object 11 0, offset 743): unknown token while reading object; treating as string
  49 +WARNING: issue-101.pdf (object 11 0, offset 745): unknown token while reading object; treating as string
  50 +WARNING: issue-101.pdf (object 11 0, offset 747): unknown token while reading object; treating as string
  51 +WARNING: issue-101.pdf (object 11 0, offset 777): unknown token while reading object; treating as string
  52 +WARNING: issue-101.pdf (object 11 0, offset 790): unknown token while reading object; treating as string
  53 +WARNING: issue-101.pdf (object 11 0, offset 800): treating unexpected brace token as null
  54 +WARNING: issue-101.pdf (object 11 0, offset 801): unknown token while reading object; treating as string
  55 +WARNING: issue-101.pdf (object 11 0, offset 811): unknown token while reading object; treating as string
  56 +WARNING: issue-101.pdf (object 11 0, offset 819): unknown token while reading object; treating as string
  57 +WARNING: issue-101.pdf (object 11 0, offset 832): unknown token while reading object; treating as string
  58 +WARNING: issue-101.pdf (object 11 0, offset 856): unexpected >
  59 +issue-101.pdf (offset 856): unable to find /Root dictionary
... ...
qpdf/qtest/qpdf/issue-106.out
1 1 WARNING: issue-106.pdf: file is damaged
2   -WARNING: issue-106.pdf (file position 809): xref not found
  2 +WARNING: issue-106.pdf (offset 809): xref not found
3 3 WARNING: issue-106.pdf: Attempting to reconstruct cross-reference table
4   -WARNING: issue-106.pdf (file position 965): error decoding stream data for object 8 0: stream inflate: inflate: data: incorrect data check
5   -WARNING: issue-106.pdf (file position 965): stream will be re-processed without filtering to avoid data loss
  4 +WARNING: issue-106.pdf (offset 965): error decoding stream data for object 8 0: stream inflate: inflate: data: incorrect data check
  5 +WARNING: issue-106.pdf (offset 965): stream will be re-processed without filtering to avoid data loss
6 6 qpdf: operation succeeded with warnings; resulting file may have some problems
... ...
qpdf/qtest/qpdf/issue-117.out
1 1 WARNING: issue-117.pdf: file is damaged
2   -WARNING: issue-117.pdf (file position 3526): xref not found
  2 +WARNING: issue-117.pdf (offset 3526): xref not found
3 3 WARNING: issue-117.pdf: Attempting to reconstruct cross-reference table
4   -WARNING: issue-117.pdf (file position 66): loop detected resolving object 2 0
5   -WARNING: issue-117.pdf (object 2 0, file position 22): /Length key in stream dictionary is not an integer
6   -WARNING: issue-117.pdf (object 2 0, file position 67): attempting to recover stream length
7   -WARNING: issue-117.pdf (object 2 0, file position 67): recovered stream length: 91
  4 +WARNING: issue-117.pdf (offset 66): loop detected resolving object 2 0
  5 +WARNING: issue-117.pdf (object 2 0, offset 22): /Length key in stream dictionary is not an integer
  6 +WARNING: issue-117.pdf (object 2 0, offset 67): attempting to recover stream length
  7 +WARNING: issue-117.pdf (object 2 0, offset 67): recovered stream length: 91
8 8 attempt to make a stream into a direct object
... ...
qpdf/qtest/qpdf/issue-118.out
1 1 WARNING: issue-118.pdf: can't find PDF header
2   -WARNING: issue-118.pdf (file position 732): loop detected resolving object 2 0
3   -WARNING: issue-118.pdf (xref stream: object 8 0, file position 732): supposed object stream 2 is not a stream
4   -issue-118.pdf (file position 732): unable to find /Root dictionary
  2 +WARNING: issue-118.pdf (offset 732): loop detected resolving object 2 0
  3 +WARNING: issue-118.pdf (xref stream: object 8 0, offset 732): supposed object stream 2 is not a stream
  4 +issue-118.pdf (offset 732): unable to find /Root dictionary
... ...
qpdf/qtest/qpdf/issue-119.out
1   -WARNING: issue-119.pdf (object 4 0, file position 298): expected dictionary key but found non-name object; inserting key /QPDFFake1
2   -WARNING: issue-119.pdf (object 4 0, file position 298): expected dictionary key but found non-name object; inserting key /QPDFFake2
  1 +WARNING: issue-119.pdf (object 4 0, offset 298): expected dictionary key but found non-name object; inserting key /QPDFFake1
  2 +WARNING: issue-119.pdf (object 4 0, offset 298): expected dictionary key but found non-name object; inserting key /QPDFFake2
3 3 qpdf: operation succeeded with warnings; resulting file may have some problems
... ...
qpdf/qtest/qpdf/issue-120.out
1   -WARNING: issue-120.pdf (file position 85): loop detected resolving object 3 0
2   -WARNING: issue-120.pdf (object 6 0, file position 85): supposed object stream 3 is not a stream
  1 +WARNING: issue-120.pdf (offset 85): loop detected resolving object 3 0
  2 +WARNING: issue-120.pdf (object 6 0, offset 85): supposed object stream 3 is not a stream
3 3 qpdf: operation succeeded with warnings; resulting file may have some problems
... ...
qpdf/qtest/qpdf/issue-141a.out
1 1 WARNING: issue-141a.pdf: can't find PDF header
2   -WARNING: issue-141a.pdf (xref stream: object 9 0, file position 10): stream dictionary lacks /Length key
3   -WARNING: issue-141a.pdf (xref stream: object 9 0, file position 47): attempting to recover stream length
4   -WARNING: issue-141a.pdf (xref stream: object 9 0, file position 47): unable to recover stream data; treating stream as empty
  2 +WARNING: issue-141a.pdf (xref stream: object 9 0, offset 10): stream dictionary lacks /Length key
  3 +WARNING: issue-141a.pdf (xref stream: object 9 0, offset 47): attempting to recover stream length
  4 +WARNING: issue-141a.pdf (xref stream: object 9 0, offset 47): unable to recover stream data; treating stream as empty
5 5 WARNING: issue-141a.pdf: file is damaged
6   -WARNING: issue-141a.pdf (xref stream, file position 3): Cross-reference stream's /W indicates entry size of 0
  6 +WARNING: issue-141a.pdf (xref stream, offset 3): Cross-reference stream's /W indicates entry size of 0
7 7 WARNING: issue-141a.pdf: Attempting to reconstruct cross-reference table
8 8 issue-141a.pdf: unable to find trailer dictionary while recovering damaged file
... ...
qpdf/qtest/qpdf/issue-141b.out
1 1 WARNING: issue-141b.pdf: can't find PDF header
2 2 WARNING: issue-141b.pdf: file is damaged
3   -WARNING: issue-141b.pdf (file position 7): xref not found
  3 +WARNING: issue-141b.pdf (offset 7): xref not found
4 4 WARNING: issue-141b.pdf: Attempting to reconstruct cross-reference table
5 5 issue-141b.pdf: unable to find trailer dictionary while recovering damaged file
... ...
qpdf/qtest/qpdf/issue-143.out
1 1 WARNING: issue-143.pdf: can't find PDF header
2   -WARNING: issue-143.pdf (xref stream: object 3 0, file position 654): stream keyword not followed by proper line terminator
3   -WARNING: issue-143.pdf (xref stream: object 3 0, file position 607): stream dictionary lacks /Length key
4   -WARNING: issue-143.pdf (xref stream: object 3 0, file position 654): attempting to recover stream length
5   -WARNING: issue-143.pdf (xref stream: object 3 0, file position 654): recovered stream length: 36
  2 +WARNING: issue-143.pdf (xref stream: object 3 0, offset 654): stream keyword not followed by proper line terminator
  3 +WARNING: issue-143.pdf (xref stream: object 3 0, offset 607): stream dictionary lacks /Length key
  4 +WARNING: issue-143.pdf (xref stream: object 3 0, offset 654): attempting to recover stream length
  5 +WARNING: issue-143.pdf (xref stream: object 3 0, offset 654): recovered stream length: 36
6 6 WARNING: issue-143.pdf: file is damaged
7   -WARNING: issue-143.pdf (object 1 0, file position 48): expected n n obj
  7 +WARNING: issue-143.pdf (object 1 0, offset 48): expected n n obj
8 8 WARNING: issue-143.pdf: Attempting to reconstruct cross-reference table
9   -WARNING: issue-143.pdf (object 1 0, file position 24): expected dictionary key but found non-name object; inserting key /QPDFFake1
10   -WARNING: issue-143.pdf (object 1 0, file position 24): expected dictionary key but found non-name object; inserting key /QPDFFake2
11   -WARNING: issue-143.pdf (object 1 0, file position 24): expected dictionary key but found non-name object; inserting key /QPDFFake3
12   -WARNING: issue-143.pdf (object 1 0, file position 24): expected dictionary key but found non-name object; inserting key /QPDFFake4
13   -WARNING: issue-143.pdf (object 1 0, file position 21): stream dictionary lacks /Length key
14   -WARNING: issue-143.pdf (object 1 0, file position 84): attempting to recover stream length
15   -WARNING: issue-143.pdf (object 1 0, file position 84): recovered stream length: 606
16   -WARNING: issue-143.pdf object stream 1 (object 2 0, file position 33): expected dictionary key but found non-name object; inserting key /QPDFFake1
  9 +WARNING: issue-143.pdf (object 1 0, offset 24): expected dictionary key but found non-name object; inserting key /QPDFFake1
  10 +WARNING: issue-143.pdf (object 1 0, offset 24): expected dictionary key but found non-name object; inserting key /QPDFFake2
  11 +WARNING: issue-143.pdf (object 1 0, offset 24): expected dictionary key but found non-name object; inserting key /QPDFFake3
  12 +WARNING: issue-143.pdf (object 1 0, offset 24): expected dictionary key but found non-name object; inserting key /QPDFFake4
  13 +WARNING: issue-143.pdf (object 1 0, offset 21): stream dictionary lacks /Length key
  14 +WARNING: issue-143.pdf (object 1 0, offset 84): attempting to recover stream length
  15 +WARNING: issue-143.pdf (object 1 0, offset 84): recovered stream length: 606
  16 +WARNING: issue-143.pdf object stream 1 (object 2 0, offset 33): expected dictionary key but found non-name object; inserting key /QPDFFake1
17 17 qpdf: operation succeeded with warnings; resulting file may have some problems
... ...
qpdf/qtest/qpdf/issue-146.out
1 1 WARNING: issue-146.pdf: file is damaged
2 2 WARNING: issue-146.pdf: can't find startxref
3 3 WARNING: issue-146.pdf: Attempting to reconstruct cross-reference table
4   -WARNING: issue-146.pdf (trailer, file position 20728): unknown token while reading object; treating as string
5   -issue-146.pdf (trailer, file position 20732): unexpected EOF
  4 +WARNING: issue-146.pdf (trailer, offset 20728): unknown token while reading object; treating as string
  5 +issue-146.pdf (trailer, offset 20732): unexpected EOF
... ...
qpdf/qtest/qpdf/issue-147.out
... ... @@ -2,7 +2,7 @@ WARNING: issue-147.pdf: can&#39;t find PDF header
2 2 WARNING: issue-147.pdf: file is damaged
3 3 WARNING: issue-147.pdf: can't find startxref
4 4 WARNING: issue-147.pdf: Attempting to reconstruct cross-reference table
5   -WARNING: issue-147.pdf (trailer, file position 9): expected dictionary key but found non-name object; inserting key /QPDFFake1
6   -WARNING: issue-147.pdf (object 62 0, file position 88): expected endobj
7   -WARNING: issue-147.pdf (trailer, file position 90): invalid /ID in trailer dictionary
  5 +WARNING: issue-147.pdf (trailer, offset 9): expected dictionary key but found non-name object; inserting key /QPDFFake1
  6 +WARNING: issue-147.pdf (object 62 0, offset 88): expected endobj
  7 +WARNING: issue-147.pdf (trailer, offset 90): invalid /ID in trailer dictionary
8 8 issue-147.pdf: invalid password
... ...
qpdf/qtest/qpdf/issue-148.out
1 1 WARNING: issue-148.pdf: can't find PDF header
2   -WARNING: issue-148.pdf (xref stream: object 8 0, file position 26): stream dictionary lacks /Length key
3   -WARNING: issue-148.pdf (xref stream: object 8 0, file position 73): attempting to recover stream length
4   -WARNING: issue-148.pdf (xref stream: object 8 0, file position 73): recovered stream length: 2
5   -WARNING: issue-148.pdf (xref stream: object 8 0, file position 85): expected endobj
6   -WARNING: issue-148.pdf (file position 73): error decoding stream data for object 8 0: stream inflate: inflate: data: incorrect header check
  2 +WARNING: issue-148.pdf (xref stream: object 8 0, offset 26): stream dictionary lacks /Length key
  3 +WARNING: issue-148.pdf (xref stream: object 8 0, offset 73): attempting to recover stream length
  4 +WARNING: issue-148.pdf (xref stream: object 8 0, offset 73): recovered stream length: 2
  5 +WARNING: issue-148.pdf (xref stream: object 8 0, offset 85): expected endobj
  6 +WARNING: issue-148.pdf (offset 73): error decoding stream data for object 8 0: stream inflate: inflate: data: incorrect header check
7 7 WARNING: issue-148.pdf: file is damaged
8   -WARNING: issue-148.pdf (file position 73): getStreamData called on unfilterable stream
  8 +WARNING: issue-148.pdf (offset 73): getStreamData called on unfilterable stream
9 9 WARNING: issue-148.pdf: Attempting to reconstruct cross-reference table
10 10 issue-148.pdf: unable to find trailer dictionary while recovering damaged file
... ...
qpdf/qtest/qpdf/issue-51.out
1 1 WARNING: issue-51.pdf: can't find PDF header
2 2 WARNING: issue-51.pdf: reported number of objects (0) inconsistent with actual number of objects (9)
3   -WARNING: issue-51.pdf (object 7 0, file position 553): expected endobj
4   -WARNING: issue-51.pdf (object 1 0, file position 359): expected endobj
5   -WARNING: issue-51.pdf (file position 70): loop detected resolving object 2 0
6   -WARNING: issue-51.pdf (object 2 0, file position 26): /Length key in stream dictionary is not an integer
7   -WARNING: issue-51.pdf (object 2 0, file position 71): attempting to recover stream length
8   -WARNING: issue-51.pdf (object 2 0, file position 71): unable to recover stream data; treating stream as empty
9   -WARNING: issue-51.pdf (object 2 0, file position 977): unexpected EOF
  3 +WARNING: issue-51.pdf (object 7 0, offset 553): expected endobj
  4 +WARNING: issue-51.pdf (object 1 0, offset 359): expected endobj
  5 +WARNING: issue-51.pdf (offset 70): loop detected resolving object 2 0
  6 +WARNING: issue-51.pdf (object 2 0, offset 26): /Length key in stream dictionary is not an integer
  7 +WARNING: issue-51.pdf (object 2 0, offset 71): attempting to recover stream length
  8 +WARNING: issue-51.pdf (object 2 0, offset 71): unable to recover stream data; treating stream as empty
  9 +WARNING: issue-51.pdf (object 2 0, offset 977): unexpected EOF
10 10 qpdf: operation succeeded with warnings; resulting file may have some problems
... ...
qpdf/qtest/qpdf/issue-99.out
1 1 WARNING: issue-99.pdf: file is damaged
2   -WARNING: issue-99.pdf (file position 3526): xref not found
  2 +WARNING: issue-99.pdf (offset 3526): xref not found
3 3 WARNING: issue-99.pdf: Attempting to reconstruct cross-reference table
4   -issue-99.pdf (file position 4798): unable to find /Root dictionary
  4 +issue-99.pdf (offset 4798): unable to find /Root dictionary
... ...
qpdf/qtest/qpdf/issue-99b.out
1 1 WARNING: issue-99b.pdf: file is damaged
2   -WARNING: issue-99b.pdf (object 1 0, file position 9): object with ID 0
  2 +WARNING: issue-99b.pdf (object 1 0, offset 9): object with ID 0
3 3 WARNING: issue-99b.pdf: Attempting to reconstruct cross-reference table
4 4 WARNING: issue-99b.pdf: object 1 0 not found in file after regenerating cross reference table
5   -issue-99b.pdf (file position 763): unable to find /Root dictionary
  5 +issue-99b.pdf (offset 763): unable to find /Root dictionary
... ...
qpdf/qtest/qpdf/linearization-bounds-1.out
... ... @@ -2,7 +2,7 @@ checking linearization-bounds-1.pdf
2 2 PDF Version: 1.3
3 3 File is not encrypted
4 4 File is linearized
5   -WARNING: linearization-bounds-1.pdf (linearization hint stream: object 62 0, file position 12302): unexpected EOF
6   -WARNING: linearization-bounds-1.pdf (linearization hint stream: object 62 0, file position 1183): attempting to recover stream length
7   -WARNING: linearization-bounds-1.pdf (linearization hint stream: object 62 0, file position 1183): recovered stream length: 106
8   -linearization-bounds-1.pdf (linearization hint table, file position 1183): /S (shared object) offset is out of bounds
  5 +WARNING: linearization-bounds-1.pdf (linearization hint stream: object 62 0, offset 12302): unexpected EOF
  6 +WARNING: linearization-bounds-1.pdf (linearization hint stream: object 62 0, offset 1183): attempting to recover stream length
  7 +WARNING: linearization-bounds-1.pdf (linearization hint stream: object 62 0, offset 1183): recovered stream length: 106
  8 +linearization-bounds-1.pdf (linearization hint table, offset 1183): /S (shared object) offset is out of bounds
... ...
qpdf/qtest/qpdf/linearization-bounds-2.out
... ... @@ -2,7 +2,7 @@ checking linearization-bounds-2.pdf
2 2 PDF Version: 1.3
3 3 File is not encrypted
4 4 File is linearized
5   -WARNING: linearization-bounds-2.pdf (linearization hint stream: object 62 0, file position 1282): expected endstream
6   -WARNING: linearization-bounds-2.pdf (linearization hint stream: object 62 0, file position 1183): attempting to recover stream length
7   -WARNING: linearization-bounds-2.pdf (linearization hint stream: object 62 0, file position 1183): recovered stream length: 106
8   -linearization-bounds-2.pdf (linearization hint table, file position 1183): /S (shared object) offset is out of bounds
  5 +WARNING: linearization-bounds-2.pdf (linearization hint stream: object 62 0, offset 1282): expected endstream
  6 +WARNING: linearization-bounds-2.pdf (linearization hint stream: object 62 0, offset 1183): attempting to recover stream length
  7 +WARNING: linearization-bounds-2.pdf (linearization hint stream: object 62 0, offset 1183): recovered stream length: 106
  8 +linearization-bounds-2.pdf (linearization hint table, offset 1183): /S (shared object) offset is out of bounds
... ...
qpdf/qtest/qpdf/linearization-large-vector-alloc.out
... ... @@ -2,7 +2,7 @@ checking linearization-large-vector-alloc.pdf
2 2 PDF Version: 1.3
3 3 File is not encrypted
4 4 File is linearized
5   -WARNING: linearization-large-vector-alloc.pdf (linearization hint stream: object 62 0, file position 1282): expected endstream
6   -WARNING: linearization-large-vector-alloc.pdf (linearization hint stream: object 62 0, file position 1183): attempting to recover stream length
7   -WARNING: linearization-large-vector-alloc.pdf (linearization hint stream: object 62 0, file position 1183): recovered stream length: 106
  5 +WARNING: linearization-large-vector-alloc.pdf (linearization hint stream: object 62 0, offset 1282): expected endstream
  6 +WARNING: linearization-large-vector-alloc.pdf (linearization hint stream: object 62 0, offset 1183): attempting to recover stream length
  7 +WARNING: linearization-large-vector-alloc.pdf (linearization hint stream: object 62 0, offset 1183): recovered stream length: 106
8 8 overflow reading bit stream
... ...
qpdf/qtest/qpdf/linearized-and-warnings-1.out
1   -WARNING: linearized-and-warnings.pdf (object 2 0, file position 1117): empty object treated as null
  1 +WARNING: linearized-and-warnings.pdf (object 2 0, offset 1117): empty object treated as null
2 2 linearized-and-warnings.pdf: linearization data:
3 3  
4 4 file_size: 1310
... ...
qpdf/qtest/qpdf/linearized-and-warnings-2.out
... ... @@ -50,5 +50,5 @@ Shared Object 2:
50 50 Shared Object 3:
51 51 group length: 107
52 52 ---error---
53   -WARNING: linearized-and-warnings.pdf (object 2 0, file position 1117): empty object treated as null
  53 +WARNING: linearized-and-warnings.pdf (object 2 0, offset 1117): empty object treated as null
54 54 test 13 done
... ...
qpdf/qtest/qpdf/normalize-warnings.out
1   -WARNING: coalesce.pdf (file position 671): content normalization encountered bad tokens
2   -WARNING: coalesce.pdf (file position 671): normalized content ended with a bad token; you may be able to resolve this by coalescing content streams in combination with normalizing content. From the command line, specify --coalesce-contents
3   -WARNING: coalesce.pdf (file position 671): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
4   -WARNING: coalesce.pdf (file position 823): content normalization encountered bad tokens
5   -WARNING: coalesce.pdf (file position 823): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
6   -WARNING: coalesce.pdf (file position 962): content normalization encountered bad tokens
7   -WARNING: coalesce.pdf (file position 962): normalized content ended with a bad token; you may be able to resolve this by coalescing content streams in combination with normalizing content. From the command line, specify --coalesce-contents
8   -WARNING: coalesce.pdf (file position 962): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
  1 +WARNING: coalesce.pdf (offset 671): content normalization encountered bad tokens
  2 +WARNING: coalesce.pdf (offset 671): normalized content ended with a bad token; you may be able to resolve this by coalescing content streams in combination with normalizing content. From the command line, specify --coalesce-contents
  3 +WARNING: coalesce.pdf (offset 671): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
  4 +WARNING: coalesce.pdf (offset 823): content normalization encountered bad tokens
  5 +WARNING: coalesce.pdf (offset 823): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
  6 +WARNING: coalesce.pdf (offset 962): content normalization encountered bad tokens
  7 +WARNING: coalesce.pdf (offset 962): normalized content ended with a bad token; you may be able to resolve this by coalescing content streams in combination with normalizing content. From the command line, specify --coalesce-contents
  8 +WARNING: coalesce.pdf (offset 962): Resulting stream data may be corrupted but is may still useful for manual inspection. For more information on this warning, search for content normalization in the manual.
9 9 qpdf: operation succeeded with warnings; resulting file may have some problems
... ...
qpdf/qtest/qpdf/obj0-check.out
1 1 WARNING: obj0.pdf: file is damaged
2   -WARNING: obj0.pdf (object 1 0, file position 77): expected n n obj
  2 +WARNING: obj0.pdf (object 1 0, offset 77): expected n n obj
3 3 WARNING: obj0.pdf: Attempting to reconstruct cross-reference table
4 4 checking obj0.pdf
5 5 PDF Version: 1.3
... ...
qpdf/qtest/qpdf/split-content-stream-errors.out
... ... @@ -2,8 +2,8 @@ checking split-content-stream-errors.pdf
2 2 PDF Version: 1.3
3 3 File is not encrypted
4 4 File is not linearized
5   -WARNING: split-content-stream-errors.pdf (file position 557): error decoding stream data for object 6 0: LZWDecoder: bad code received
6   -WARNING: split-content-stream-errors.pdf (file position 557): stream will be re-processed without filtering to avoid data loss
  5 +WARNING: split-content-stream-errors.pdf (offset 557): error decoding stream data for object 6 0: LZWDecoder: bad code received
  6 +WARNING: split-content-stream-errors.pdf (offset 557): stream will be re-processed without filtering to avoid data loss
7 7 WARNING: page object 3 0 (item index 0 (from 0)): ignoring non-stream in an array of streams
8   -WARNING: split-content-stream-errors.pdf (file position 557): error decoding stream data for object 6 0: LZWDecoder: bad code received
  8 +WARNING: split-content-stream-errors.pdf (offset 557): error decoding stream data for object 6 0: LZWDecoder: bad code received
9 9 WARNING: content stream (content stream object 6 0): errors while decoding content stream
... ...
qpdf/qtest/qpdf/stream-line-enders.out
1   -WARNING: stream-line-enders.pdf (object 5 0, file position 384): stream keyword followed by carriage return only
2   -WARNING: stream-line-enders.pdf (object 6 0, file position 443): stream keyword not followed by proper line terminator
3   -WARNING: stream-line-enders.pdf (object 7 0, file position 503): stream keyword not followed by proper line terminator
  1 +WARNING: stream-line-enders.pdf (object 5 0, offset 384): stream keyword followed by carriage return only
  2 +WARNING: stream-line-enders.pdf (object 6 0, offset 443): stream keyword not followed by proper line terminator
  3 +WARNING: stream-line-enders.pdf (object 7 0, offset 503): stream keyword not followed by proper line terminator
4 4 qpdf: operation succeeded with warnings; resulting file may have some problems
... ...
qpdf/qtest/qpdf/xref-errors.out
1   -WARNING: xref-errors.pdf (xref table, file position 585): accepting invalid xref table entry
2   -WARNING: xref-errors.pdf (xref table, file position 606): accepting invalid xref table entry
3   -WARNING: xref-errors.pdf (xref table, file position 627): accepting invalid xref table entry
4   -WARNING: xref-errors.pdf (xref table, file position 648): accepting invalid xref table entry
5   -WARNING: xref-errors.pdf (xref table, file position 667): accepting invalid xref table entry
  1 +WARNING: xref-errors.pdf (xref table, offset 585): accepting invalid xref table entry
  2 +WARNING: xref-errors.pdf (xref table, offset 606): accepting invalid xref table entry
  3 +WARNING: xref-errors.pdf (xref table, offset 627): accepting invalid xref table entry
  4 +WARNING: xref-errors.pdf (xref table, offset 648): accepting invalid xref table entry
  5 +WARNING: xref-errors.pdf (xref table, offset 667): accepting invalid xref table entry
6 6 checking xref-errors.pdf
7 7 PDF Version: 1.3
8 8 File is not encrypted
... ...
qpdf/qtest/qpdf/xref-with-short-size-recover.out
1   -WARNING: xref-with-short-size.pdf (xref stream, file position 16227): Cross-reference stream data has the wrong size; expected = 52; actual = 56
  1 +WARNING: xref-with-short-size.pdf (xref stream, offset 16227): Cross-reference stream data has the wrong size; expected = 52; actual = 56
2 2 qpdf: operation succeeded with warnings; resulting file may have some problems
... ...
qpdf/qtest/qpdf/xref-with-short-size.out
1   -WARNING: xref-with-short-size.pdf (xref stream, file position 16227): Cross-reference stream data has the wrong size; expected = 52; actual = 56
  1 +WARNING: xref-with-short-size.pdf (xref stream, offset 16227): Cross-reference stream data has the wrong size; expected = 52; actual = 56
2 2 1/0: compressed; stream = 5, index = 1
3 3 2/0: compressed; stream = 5, index = 0
4 4 3/0: uncompressed; offset = 15
... ...