Expand description
PDF embed synthesizer.
Receives a TitleParams (Stage 2 dispatcher already parsed it), the
source URL, and an AssetSnapshot. Emits the final <object>-based
PDF embed HTML — preserving the exact byte shape moss-core’s PdfRenderer
used to emit before Phase 0’s Stage 1 migration.
Pre-Phase-0 byte shape (extracted from crates/moss-core/src/resolve/ embed_renderer.rs at commit 689d975e9^):
<object class="moss-embed" data-type="pdf"{data-width?} type="application/pdf"
data="{src}"{width?}{height?}>
<a href="{src}">Download {stem}</a>
</object>The <object> element (rather than <iframe>) was chosen by the original
PdfRenderer for keyboard-navigation parity and an inline download
fallback in browsers that can’t render PDFs natively.
Functions§
- synthesize_
pdf_ html - Synthesize PDF embed HTML for
Tag::Linkwithmoss:kind=pdftitle.