Skip to content

Enable PDF stream compression when optimize is enabled - #284

Open
ertankucukoglu wants to merge 1 commit into
fschutt:masterfrom
ertankucukoglu:fix/pdf-stream-compression
Open

Enable PDF stream compression when optimize is enabled#284
ertankucukoglu wants to merge 1 commit into
fschutt:masterfrom
ertankucukoglu:fix/pdf-stream-compression

Conversation

@ertankucukoglu

Copy link
Copy Markdown

What changed

  • PDFs are compressed when optimize is enabled.
  • Embedded fonts are compressed safely.
  • Disabling optimize still keeps streams uncompressed.
  • The original font size information is preserved so PDF readers can open the file correctly.

Why

The save option said it would compress PDFs, but the compression call was disabled and font compression was blocked. This made generated PDF files larger than necessary.

Tests

  • cargo test
  • cargo test --test stream_compression (4 passed)
  • cargo test --features html --test external_tools --test font_embedding -- --nocapture (24 passed)

@fschutt

fschutt commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Huh, I thought this was re-enabled, thanks. I'll merge it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants