pub fn write_pdf_with_annotations(
scene: &Scene,
annotations: &[Annotation],
) -> Result<Vec<u8>, PdfError>Expand description
Render a Scene in pages mode + a slice of Annotations and
return the serialised PDF bytes.
Constraints:
scenemust be in pages mode (same contract ascrate::write_pdf_from_scene).- Each annotation’s
source_page_indexmust be< scene.pages.len().
Wire-level shape: every annotation becomes one indirect dict carrying
/Type /Annot /Subtype /X /Rect … per §12.5.2 Table 164 + the
matching subtype’s §12.5.6.X table. Each page’s /Annots is the
array of references to its annotations.