Skip to main content

render_pdf_multi

Function render_pdf_multi 

Source
pub fn render_pdf_multi(
    scenes: &[Scene],
    fonts: &dyn FontProvider,
    assets: &dyn AssetProvider,
) -> Vec<u8> 
Expand description

Render scenes (one per document page, in order) to a single deterministic multi-page vector PDF, sharing one sequential object-id space.

Object ids are allocated by an ordered walk: catalog=1, page-tree=2, then for each scene in order its page dict, content stream, and resource objects (ExtGStates, gradient shadings + functions, images + SMasks) from one shared monotonic counter starting at 3. With a single scene this reproduces the historical single-page numbering exactly, so additive multi-page support is byte-identical when only one page is present.

Print box metadata, DeviceCMYK colors, and full determinism (no timestamps, no document id, ordered iteration throughout) match render_pdf.