pub struct PdfPageResource {
pub media_box: (f64, f64, f64, f64),
pub content: Vec<u8>,
pub resources: ImportedObjects,
}Expand description
An embedded page of an external PDF (load-pdf-image), carrying just
enough of the source page’s object graph to re-emit it as a PDF Form
XObject. Deliberately lopdf-free plain data so rustyfi-backend need
not depend on lopdf.
Fields§
§media_box: (f64, f64, f64, f64)The source page’s /MediaBox, (x0, y0, x1, y1) in raw PDF points
(upstream loadPdf.ml: MediaBox only, no /CropBox fallback).
content: Vec<u8>The page’s content stream(s), already inflated (/FlateDecode
resolved) and concatenated (with a separating space per PDF rules
when a page has more than one content stream) — ready to wrap
verbatim in a Form XObject’s stream body.
resources: ImportedObjectsThe imported object subtree reachable from the page’s /Resources,
self-contained and keyed by source object number so the writer can
remap references to freshly allocated output Refs. Local id 0 is
reserved (PDF object number 0 is always free/unused in a well-formed
file) and holds the page’s own /Resources dictionary itself
(whether it was a direct or an indirect object in the source); every
other entry is a real source object number.
Trait Implementations§
Source§impl Clone for PdfPageResource
impl Clone for PdfPageResource
Source§fn clone(&self) -> PdfPageResource
fn clone(&self) -> PdfPageResource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more