QPdf: do not write a /Filter key if we are not compressing

Streams may or may not be compressed depending on zlib availability,
so fix this dictionary.

This work has been kindly sponsored by the QGIS project
(https://qgis.org/).

Change-Id: I852569f053a1338d4bc54be5e8fb1e9c7741a5a1
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
Reviewed-by: Albert Astals Cid <aacid@kde.org>
bb10
Giuseppe D'Angelo 2024-05-03 18:31:00 +02:00
parent fd97a820df
commit 67dffd871f
1 changed files with 2 additions and 1 deletions

View File

@ -1802,7 +1802,8 @@ int QPdfEnginePrivate::writeOutputIntent()
s << "/N 3\n";
s << "/Alternate /DeviceRGB\n";
s << "/Length " << length_object << "0 R\n";
s << "/Filter /FlateDecode\n";
if (do_compress)
s << "/Filter /FlateDecode\n";
s << ">>\n";
s << "stream\n";
write(data);