fix(documents): render PDFs with pdfjs font data and refuse blank pages

Refs #1124. The rasterizer opened pdfjs without its standard font, CMap
and wasm directories and told it to use system fonts. The runtime image
has none, so any text pdfjs could not draw from an embedded program (a
non-embedded standard font, or an embedded one it cannot parse) came out
as nothing, and an image-only provider was sent the page background. A
workstation hides this because its own fonts stand in.

pdfjs now gets the directories from its own package, resolved at runtime
from the working directory, and Liberation Sans from that package is
registered as the canvas' sans-serif, serif and monospace faces for the
text pdfjs draws with a substitute.

A document whose every rendered page is blank now reports render-failed,
so the read records raster-failed instead of indexing a transcript of an
empty page as a success.
This commit is contained in:
Marc-André Bombeck committed 2026-10-04 10:37:24 +02:00
1 parent b63fa317f3
commit 4b73099e75
7 files changed
+358 -10

No files matched your search

Binary file not shown.
Binary file not shown.
Binary file not shown.