diff options
author | Jay Berkenbilt <ejb@ql.org> | 2012-12-25 20:38:18 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2012-12-25 20:43:37 +0100 |
commit | 7f84239cad2ec58166245394e56a4647085e025e (patch) | |
tree | de91917df48f54d645c90f67a1cb1a49214b5d5f /qpdf/qtest | |
parent | bcfc9847beb0f059a98ef5c8c02646b43fab4272 (diff) | |
download | qpdf-7f84239cad2ec58166245394e56a4647085e025e.tar.zst |
Find PDF header anywhere in the first 1024 bytes
Diffstat (limited to 'qpdf/qtest')
-rw-r--r-- | qpdf/qtest/qpdf.test | 6 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/leading-junk.out | 17 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/leading-junk.pdf | bin | 0 -> 13670 bytes |
3 files changed, 22 insertions, 1 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test index 16af5832..35645466 100644 --- a/qpdf/qtest/qpdf.test +++ b/qpdf/qtest/qpdf.test @@ -149,7 +149,7 @@ $td->runtest("remove page we don't have", $td->NORMALIZE_NEWLINES); # ---------- $td->notify("--- Miscellaneous Tests ---"); -$n_tests += 56; +$n_tests += 57; $td->runtest("qpdf version", {$td->COMMAND => "qpdf --version"}, @@ -414,6 +414,10 @@ $td->runtest("object with zero offset", {$td->COMMAND => "qpdf --check zero-offset.pdf"}, {$td->FILE => "zero-offset.out", $td->EXIT_STATUS => 3}, $td->NORMALIZE_NEWLINES); +$td->runtest("check file with leading junk", + {$td->COMMAND => "qpdf --check leading-junk.pdf"}, + {$td->FILE => "leading-junk.out", $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); show_ntests(); # ---------- diff --git a/qpdf/qtest/qpdf/leading-junk.out b/qpdf/qtest/qpdf/leading-junk.out new file mode 100644 index 00000000..58847c9d --- /dev/null +++ b/qpdf/qtest/qpdf/leading-junk.out @@ -0,0 +1,17 @@ +checking leading-junk.pdf +PDF Version: 1.4 +R = 3 +P = -4 +User password = +extract for accessibility: allowed +extract for any purpose: allowed +print low resolution: allowed +print high resolution: allowed +modify document assembly: allowed +modify forms: allowed +modify annotations: allowed +modify other: allowed +modify anything: allowed +File is linearized +No syntax or stream encoding errors found; the file may still contain +errors that qpdf cannot detect diff --git a/qpdf/qtest/qpdf/leading-junk.pdf b/qpdf/qtest/qpdf/leading-junk.pdf Binary files differnew file mode 100644 index 00000000..2b2a0a2c --- /dev/null +++ b/qpdf/qtest/qpdf/leading-junk.pdf |