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 -2
View File
@@ -24,8 +24,8 @@ glam = { version = "0.27", features = ["serde"] }
# Asynchroner Starter für wgpu-Device-Setup
pollster = "0.3"
# PDF-Vektorexport
printpdf = "0.7"
# PDF: writing the export (own writer in src/pdf_writer.rs) and merging imported PDFs
lopdf = { version = "0.46", default-features = false }
serde = { version = "1.0.229", features = ["derive"] }
serde_json = "1.0.151"