Repository navigation
M4.86–M4.87: PDF thumbnails, fast web view and PDF 1.3 (M4 done) - #124
Merged
Merged
Conversation
Embed Page Thumbnails gives every page a /Thumb image: the page drawn on white, 106 px on its long side, without the layers the page leaves out (the engine draws them; vectorcraft_pdf::page_areas says what each page shows; PDF/X files get grey ones). Optimize for Fast Web View writes a linearised file: the objects are put in linearised order and numbering, encrypted when a password asks (the encryption dictionary goes with the catalog, PDF layers' groups too), then laid out with the linearization dictionary, both cross-reference tables and the page offset and shared object hint tables (the hint stream encrypted like any other). Their "not applied yet" warnings are gone. Reading the objects back uses the lexer of encrypt.rs (syntax.rs adds what rewriting needs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…preset compatibility "1.3" writes a %PDF-1.3 file (its XMP metadata says 1.3 too) without transparency: a copy of the document is flattened first with flattenerPreset (stored with PDF presets; empty is High Resolution) and the flattener options over it, see-through image pixels counting as transparency and rasterized areas clipped to their regions so no soft mask is needed. Page groups are left out and the writer refuses a file that would still have transparency. PDF/X-1a and PDF/X-3 share this path (their version is now PDF 1.3; 1.4 is still accepted and written as 1.3), and with it the preset, the header and metadata code and the transparency check. Passwords at PDF 1.3 encrypt with 40-bit RC4 (revision 2). The Save PDF dialog lists PDF 1.3 and picks the flattener preset under Advanced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PDF page thumbnails, fast web view (linearised files) and PDF 1.3 compatibility. This is the last M4 package; the ROADMAP now marks M4 done.
M4.86: thumbnails and fast web view
thumbnails: truegives every page a/Thumbimage, 106 px on its long side. PDF/X files get grey thumbnails, so X-1a stays CMYK-only.fastWebView: truewrites a linearised file (pdf/src/linearize.rs, run from the post-write pipeline inpost.rs).M4.87: PDF 1.3
compatibility: "1.3"flattens a copy of the document withflattenerPreset(High Resolution by default; PDF presets store it).flattenerPreset(default unchanged).ROADMAP and README
eps,cadandmetafile.Checks
mainat87df4a0(M4.82–M4.83: PDF layers and overprint #123).cargo xtask cipasses all 7 steps (fmt, clippy, tests, assets, brands, layers, wasm), with 2,921 tests.main, every test (2899 → 2914 by name), engine command, UI command, menu entry and MCP tool is still there.tests_settings: the camel-case test's bad version is now "1.2", and the warnings test no longer expects the thumbnails and fast web view warnings.tests_pdf::bad_options_are_refused(1.2 row, new 1.3 rows) andoptions_not_applied_yet_and_document_features_warn.tests_pdfpresets::saved_presets_apply_wherever_a_preset_is_namedtests_pdfx::choosing_a_pdfx_standard_…(1.4 → 1.3)save_pdf: three dialog tests.docs/mcp.mdcode fences are balanced.🤖 Generated with Claude Code