Skip to main content

set_trim_boxes

Function set_trim_boxes 

Source
pub fn set_trim_boxes(doc: &mut Document, bleed_pts: f64) -> Result<()>
Expand description

Sets a TrimBox on every page by insetting the MediaBox by bleed_pts on all sides.

Reads each page’s MediaBox, shrinks it inward by bleed_pts, and writes the result back as the page’s TrimBox. Any existing TrimBox is overwritten.