diff options
author | Jay Berkenbilt <ejb@ql.org> | 2018-01-31 03:39:38 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2018-02-19 03:05:46 +0100 |
commit | 6afe83978fe1d310e8a41774c33052d880f2f524 (patch) | |
tree | 3ec8d842ef03317ca99511341098263db5c2a367 /qpdf | |
parent | fcd611b61eb6cc352b4e072fc791681ad927aee2 (diff) | |
download | qpdf-6afe83978fe1d310e8a41774c33052d880f2f524.tar.zst |
Switch from parseContentStream to parsePageContents
Diffstat (limited to 'qpdf')
-rw-r--r-- | qpdf/qpdf.cc | 4 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/content-stream-errors.out | 6 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/eof-in-inline-image.out | 2 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/split-content-stream-errors.out | 2 | ||||
-rw-r--r-- | qpdf/test_driver.cc | 3 |
5 files changed, 7 insertions, 10 deletions
diff --git a/qpdf/qpdf.cc b/qpdf/qpdf.cc index 1c56a345..bf5d7078 100644 --- a/qpdf/qpdf.cc +++ b/qpdf/qpdf.cc @@ -1769,9 +1769,7 @@ static void do_check(QPDF& pdf, Options& o, int& exit_code) ++pageno; try { - QPDFObjectHandle::parseContentStream( - (*iter).getKey("/Contents"), - &discard_contents); + (*iter).parsePageContents(&discard_contents); } catch (QPDFExc& e) { diff --git a/qpdf/qtest/qpdf/content-stream-errors.out b/qpdf/qtest/qpdf/content-stream-errors.out index d36d61b3..7a4dc944 100644 --- a/qpdf/qtest/qpdf/content-stream-errors.out +++ b/qpdf/qtest/qpdf/content-stream-errors.out @@ -2,6 +2,6 @@ checking content-stream-errors.pdf PDF Version: 1.3 File is not encrypted File is not linearized -page 1: content stream objects 7 0 (content, file position 52): parse error while reading object -page 3: content stream objects 15 0 (stream data, file position 117): EOF found while reading inline image -page 4: content stream objects 19 0 (content, file position 53): parse error while reading object +page 1: page object 3 0 stream 7 0 (content, file position 52): parse error while reading object +page 3: page object 5 0 stream 15 0 (stream data, file position 117): EOF found while reading inline image +page 4: page object 6 0 stream 19 0 (content, file position 53): parse error while reading object diff --git a/qpdf/qtest/qpdf/eof-in-inline-image.out b/qpdf/qtest/qpdf/eof-in-inline-image.out index cb2acf97..a79406fc 100644 --- a/qpdf/qtest/qpdf/eof-in-inline-image.out +++ b/qpdf/qtest/qpdf/eof-in-inline-image.out @@ -22,4 +22,4 @@ name: /Fl name: /DP dictionary: << /Columns 1 /Predictor 15 >> operator: ID -content stream objects 4 0 (stream data, file position 139): EOF found while reading inline image +page object 3 0 stream 4 0 (stream data, file position 139): EOF found while reading inline image diff --git a/qpdf/qtest/qpdf/split-content-stream-errors.out b/qpdf/qtest/qpdf/split-content-stream-errors.out index fbfe020d..ec4e5dea 100644 --- a/qpdf/qtest/qpdf/split-content-stream-errors.out +++ b/qpdf/qtest/qpdf/split-content-stream-errors.out @@ -4,6 +4,6 @@ File is not encrypted File is not linearized WARNING: split-content-stream-errors.pdf (file position 557): error decoding stream data for object 6 0: LZWDecoder: bad code received WARNING: split-content-stream-errors.pdf (file position 557): stream will be re-processed without filtering to avoid data loss -WARNING: content stream objects (item index 0 (from 0)): ignoring non-stream in an array of streams +WARNING: page object 3 0 (item index 0 (from 0)): ignoring non-stream in an array of streams WARNING: split-content-stream-errors.pdf (file position 557): error decoding stream data for object 6 0: LZWDecoder: bad code received WARNING: content stream (content stream object 6 0): errors while decoding content stream diff --git a/qpdf/test_driver.cc b/qpdf/test_driver.cc index 2f99c3f5..001e6dfb 100644 --- a/qpdf/test_driver.cc +++ b/qpdf/test_driver.cc @@ -1296,9 +1296,8 @@ void runtest(int n, char const* filename1, char const* arg2) iter != pages.end(); ++iter) { QPDFObjectHandle page = *iter; - QPDFObjectHandle contents = page.getKey("/Contents"); ParserCallbacks cb; - QPDFObjectHandle::parseContentStream(contents, &cb); + page.parsePageContents(&cb); } } else if (n == 38) |