Disable image compression when saving PDF

Some tests [1] lead to the conclusion that ocr_compression does the same
to the file (performance and size-wise) to the file as deflating images
when saving the file. However, both methods active do add a bit of extra
time. For this reason we're disabling the image deflation (default
option).

[1]: https://github.com/freedomofpress/dangerzone/pull/622#discussion_r1434042296
This commit is contained in:
deeplow 2023-12-21 13:03:55 +00:00
parent 6f61e44502
commit ee35e28aa6
No known key found for this signature in database
GPG key ID: 577982871529A52A

View file

@ -86,7 +86,7 @@ class PixelsToPDF(DangerzoneConverter):
else:
safe_pdf_path = f"/safezone/safe-output-compressed.pdf"
safe_doc.save(safe_pdf_path, deflate_images=True)
safe_doc.save(safe_pdf_path)
async def main() -> int: