Commit 306d734b368ac094ae37ba7382e56ec83ff30c70
1 parent
65302426
Stop `--compress-streams=n` from automatically disabling preservation of existin…
…g encryption and update related tests.
Showing
4 changed files
with
9 additions
and
3 deletions
libqpdf/QPDFWriter.cc
| ... | ... | @@ -2268,7 +2268,7 @@ QPDFWriter::Members::doWriteSetup() |
| 2268 | 2268 | if (encryption) { |
| 2269 | 2269 | // Encryption has been explicitly set |
| 2270 | 2270 | preserve_encryption = false; |
| 2271 | - } else if (normalize_content || !compress_streams || pclm || qdf_mode) { | |
| 2271 | + } else if (normalize_content || pclm || qdf_mode) { | |
| 2272 | 2272 | // Encryption makes looking at contents pretty useless. If the user explicitly encrypted |
| 2273 | 2273 | // though, we still obey that. |
| 2274 | 2274 | preserve_encryption = false; | ... | ... |
manual/release-notes.rst
| ... | ... | @@ -59,6 +59,11 @@ more detail. |
| 59 | 59 | |
| 60 | 60 | - Other changes |
| 61 | 61 | |
| 62 | + - Setting :qpdf:ref:`--compress-streams` to ``n`` or | |
| 63 | + ``QPDFWriter::setCompressStreams(false)`` no longer automatically | |
| 64 | + causes the outputfile to be decrypted. Set :qpdf:ref:`--decrypt` if this | |
| 65 | + is the intended behaviour. | |
| 66 | + | |
| 62 | 67 | - There has been some refactoring of stream filtering. These are optimized |
| 63 | 68 | for the common case where no user provided stream filters are |
| 64 | 69 | registered by calling ``QPDF::registerStreamFilter``. If you are | ... | ... |
qpdf/qtest/content-preservation.test
| ... | ... | @@ -30,8 +30,8 @@ my @flags = (["-qdf", # 1 |
| 30 | 30 | "qdf not uncompressed"], |
| 31 | 31 | ["-qdf --stream-data=preserve --normalize-content=n", # 4 |
| 32 | 32 | "qdf not normalized or uncompressed"], |
| 33 | - ["--stream-data=uncompress", # 5 | |
| 34 | - "uncompresed"], | |
| 33 | + ["--stream-data=uncompress --decrypt", # 5 | |
| 34 | + "uncompresed (and decrpted)"], | |
| 35 | 35 | ["--normalize-content=y", # 6 |
| 36 | 36 | "normalized"], |
| 37 | 37 | ["--stream-data=uncompress --normalize-content=y", # 7 | ... | ... |