Skip to content

Commit

Permalink
Disable image compression when saving PDF
Browse files Browse the repository at this point in the history
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]: #622 (comment)
  • Loading branch information
deeplow committed Jan 4, 2024
1 parent 4a7f1ab commit 381ad8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dangerzone/conversion/pixels_to_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async def convert(
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:
Expand Down

0 comments on commit 381ad8d

Please sign in to comment.