build: replace printpdf 0.7 with own PDF writer on lopdf 0.46

printpdf 0.7 pinned lopdf 0.31; newer printpdf versions are a complete
rewrite. The export now uses src/pdf_writer.rs, a small writer on top of
lopdf 0.46 with the subset of the printpdf API the export used: pages with
layers (optional content groups), paths, embedded TrueType fonts (Type0,
Identity-H, ToUnicode), images and bookmarks. Bookmark titles are written
as UTF-16BE directly, so the post-processing step for them is gone.
pdf_merge uses lopdf 0.46 as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
haraldandClaude Opus 5.5 committed 2026-10-27 16:54:13 +01:00
1 parent d610ca019a
commit e47c2b6f28
11 files changed
+1564 -265

No files matched your search

+2 -1
View File
@@ -181,6 +181,7 @@ src/
├── assets.rs # Images and PDFs in the notebook folder
├── pdf_doc.rs # Reading and rendering PDFs (hayro)
├── pdf_merge.rs # Underlaying imported PDF pages on export
├── pdf_writer.rs # Small PDF writer for the export (lopdf)
├── import.rs # Import as a new notebook (shared parts)
├── xopp.rs # Import of Xournal++/Xournal notebooks
├── rnote.rs # Import of Rnote notebooks
@@ -191,7 +192,7 @@ src/
├── disk_watch.rs # Taking over changes from other devices (sync clients)
├── library.rs # Notebook folders (library.json)
├── autosave.rs # Saving in the background
├── export.rs # PDF export (printpdf)
├── export.rs # PDF export
├── page_export.rs # Page as PNG/SVG, selection as image
├── file_picker.rs # Built-in file picker
├── settings.rs # Settings (~/.config/ink-notes/ui.json)