Expand description
PDF rendering for transformed Markdoc documents.
Three-pass pipeline:
- layout ([
block::layout_document]) — walk the rendered tree, lay out each block via parley, return a flatVec<Block>with heights baked in. - paginate ([
paginate::paginate]) — greedy split of blocks into pages so the running height stays under the page budget. - emit ([
emit::emit_blocks]) — open one krilla page per group and draw the blocks.
Re-exports§
pub use style::FrontmatterColumn;pub use style::FrontmatterTable;pub use style::Style;pub use style::StyleLoadError;
Modules§
- style
- Document style spec.
Structs§
- External
Tagref - Website destination for a
{% tag %}that is not in the PDF. - Render
Context - Caller-supplied context that the renderer can interpolate into header/footer template strings and surface as PDF document metadata.
Enums§
- Render
Error - Render a transformed Markdoc tree to PDF bytes using the given style.
Media references resolve through the null resolver (placeholder text);
for documents that contain images, use
render_pdf_with_assets. Errors surfaced by the final PDF serialisation pass. Layout itself is infallible by construction; krilla defers image stream encoding tofinish(), so a corrupt embedded asset surfaces here — as an error the CLI reports cleanly, not a panic.
Functions§
- render_
pdf - render_
pdf_ with - Full-control entry: caller provides assets resolver and
RenderContext(used for header/footer template substitution like{title}). - render_
pdf_ with_ assets - Render with a caller-supplied asset resolver. Equivalent to
render_pdf_withwith a defaultRenderContext.