pub fn write_pdf_3d(
title: &str,
pages: &[&SheetDrawing],
three_d: Option<&Pdf3d>,
) -> Vec<u8> ⓘExpand description
write_pdf, carrying a live 3D model (super::pdf3d) when three_d
is given: a 3D annotation over each placement it names, and — when it asks
for one — a last page given over to the model with a button per saved
view.
With 3D the file is PDF 1.7 (per-view node visibility is a 1.7 feature)
and pages carry /Annots; the rest of this module’s contract holds — the
U3D stream is ASCII85-encoded, so every byte is still ASCII. Without it the
output is byte for byte write_pdf’s.
5 … 4+2n the sheet pages, (page, contents) pairs as above
5+2n, 6+2n the 3D page and its contents, when asked for
next the 3D stream (the U3D, and every saved view in /VA)
then per placement: its 3D annotation, its (empty) appearance
then the 3D page's annotation, its appearance, a link per view