UX: remember last directory and zoom level; add support for jbig2/jpeg2000 to preview#434
UX: remember last directory and zoom level; add support for jbig2/jpeg2000 to preview#434sam2kb wants to merge 2 commits into
Conversation
sam2kb
commented
Jun 27, 2026
- Remember chosen directory in File > Open across invocations, persisted to config.properties.
- Remember zoom level across document loads, persisted to config.properties.
- Add jbig2-imageio and jai-imageio-jpeg2000 dependencies so the PDF preview can render optimized/reduced-size PDFs.
…review support - Remember chosen directory in File > Open across invocations, persisted to config.properties. - Remember zoom level across document loads, persisted to config.properties. - Add jbig2-imageio and jai-imageio-jpeg2000 dependencies so the PDF preview can render optimized/reduced-size PDFs.
…essively - Remove the jai-imageio-jpeg2000 dependency (and its enabler jai-imageio-core runtime dep). Its bundled JJ2000 codec is under a restrictive, GPL-incompatible license with a field-of-use clause and patent warning, and its license isn't in the add-third-party allow list, so it would break the release build's license check. Keep the clean Apache-2.0 jbig2-imageio for scanned (JBIG2) PDFs. - jai-imageio-core reverts to dependencyManagement-only (convergence). - Stop writing config.properties on every zoom change (blocking I/O on the FX thread); track zoom in memory and persist on document open/exit. - Persist the last open directory from openDocument() so drag-drop and recent-files opens also remember it, not just File > Open. - Log persistence failures at FINE instead of swallowing them; tidy imports and constant placement. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks for this @sam2kb! I pushed a follow-up commit (27c3779) with a few adjustments — quick summary of what changed and why: Dropped Persist view state less aggressively. The zoom listener was calling Persist last dir for all open paths. The last-directory save only happened on File > Open; drag-drop and recent-files went through Minor: log persistence failures at The remember-directory and remember-zoom UX is a nice touch — thanks again! |