Commit c5f622a09e6a68d87d3591346d872cf828cf82c7
1 parent
4c3c658e
Bug fix: don't compress object/xref streams with --compress-streams=n
Showing
4 changed files
with
7 additions
and
3 deletions
ChangeLog
libqpdf/QPDFWriter.cc
| ... | ... | @@ -1658,8 +1658,7 @@ QPDFWriter::writeObjectStream(QPDFObjectHandle object) |
| 1658 | 1658 | |
| 1659 | 1659 | // Set up a stream to write the stream data into a buffer. |
| 1660 | 1660 | Pipeline* next = pushPipeline(new Pl_Buffer("object stream")); |
| 1661 | - if ((m->compress_streams || (m->stream_decode_level == qpdf_dl_none)) && | |
| 1662 | - (!m->qdf_mode)) { | |
| 1661 | + if (m->compress_streams && !m->qdf_mode) { | |
| 1663 | 1662 | compressed = true; |
| 1664 | 1663 | next = |
| 1665 | 1664 | pushPipeline(new Pl_Flate("compress object stream", next, Pl_Flate::a_deflate)); |
| ... | ... | @@ -2417,7 +2416,7 @@ QPDFWriter::writeXRefStream( |
| 2417 | 2416 | |
| 2418 | 2417 | Pipeline* p = pushPipeline(new Pl_Buffer("xref stream")); |
| 2419 | 2418 | bool compressed = false; |
| 2420 | - if ((m->compress_streams || (m->stream_decode_level == qpdf_dl_none)) && (!m->qdf_mode)) { | |
| 2419 | + if (m->compress_streams && !m->qdf_mode) { | |
| 2421 | 2420 | compressed = true; |
| 2422 | 2421 | if (!skip_compression) { |
| 2423 | 2422 | // Write the stream dictionary for compression but don't actually compress. This helps | ... | ... |
qpdf/qtest/qpdf/good17-not-recompressed.pdf
No preview for this file type
qpdf/qtest/qpdf/newline-before-endstream-nl-objstm.pdf
No preview for this file type