diff options
-rw-r--r-- | libqpdf/QPDF_Stream.cc | 2 | ||||
-rw-r--r-- | qpdf/qpdf.testcov | 1 | ||||
-rw-r--r-- | qpdf/qtest/qpdf.test | 9 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/fax-decode-parms.out | 4 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/fax-decode-parms.pdf | bin | 0 -> 1565966 bytes |
5 files changed, 15 insertions, 1 deletions
diff --git a/libqpdf/QPDF_Stream.cc b/libqpdf/QPDF_Stream.cc index 51617e7d..5d12da32 100644 --- a/libqpdf/QPDF_Stream.cc +++ b/libqpdf/QPDF_Stream.cc @@ -145,6 +145,8 @@ QPDF_Stream::filterable(std::vector<std::string>& filters, { // Ignore for now -- some filter types, like CCITTFaxDecode, // use types other than dictionary for this. + QTC::TC("qpdf", "QPDF_Stream ignore non-dictionary DecodeParms"); + filterable = false; } diff --git a/qpdf/qpdf.testcov b/qpdf/qpdf.testcov index 3110f76a..4c5e80d4 100644 --- a/qpdf/qpdf.testcov +++ b/qpdf/qpdf.testcov @@ -118,3 +118,4 @@ unable to filter 0 QPDF_String non-trivial UTF-16 0 QPDF xref overwrite object 0 QPDF decoding error warning 0 +QPDF_Stream ignore non-dictionary DecodeParms 0 diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test index de808d65..55f7c594 100644 --- a/qpdf/qtest/qpdf.test +++ b/qpdf/qtest/qpdf.test @@ -81,7 +81,7 @@ flush_tiff_cache(); show_ntests(); # ---------- $td->notify("--- Miscellaneous Tests ---"); -$n_tests += 3; +$n_tests += 4; foreach (my $i = 1; $i <= 3; ++$i) { @@ -91,6 +91,13 @@ foreach (my $i = 1; $i <= 3; ++$i) $td->NORMALIZE_NEWLINES); } +# Make sure we ignore decode parameters that we don't understand +$td->runtest("unknown decode parameters", + {$td->COMMAND => "qpdf --check fax-decode-parms.pdf"}, + {$td->FILE => "fax-decode-parms.out", + $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); + show_ntests(); # ---------- $td->notify("--- Error Condition Tests ---"); diff --git a/qpdf/qtest/qpdf/fax-decode-parms.out b/qpdf/qtest/qpdf/fax-decode-parms.out new file mode 100644 index 00000000..78c65c18 --- /dev/null +++ b/qpdf/qtest/qpdf/fax-decode-parms.out @@ -0,0 +1,4 @@ +checking fax-decode-parms.pdf +File is not encrypted +File is not linearized +No errors found diff --git a/qpdf/qtest/qpdf/fax-decode-parms.pdf b/qpdf/qtest/qpdf/fax-decode-parms.pdf Binary files differnew file mode 100644 index 00000000..2d8c336b --- /dev/null +++ b/qpdf/qtest/qpdf/fax-decode-parms.pdf |