pub struct PdfPage {
pub width: Pt,
pub height: Pt,
pub layers: Vec<PdfLayer>,
/* private fields */
}
Expand description
PDF page
Fields§
§width: Pt
page width in point
height: Pt
page height in point
layers: Vec<PdfLayer>
Page layers
Implementations§
source§impl PdfPage
impl PdfPage
sourcepub fn new<S>(
width: Mm,
height: Mm,
layer_name: S,
page_index: usize
) -> (Self, PdfLayerIndex)
pub fn new<S>( width: Mm, height: Mm, layer_name: S, page_index: usize ) -> (Self, PdfLayerIndex)
Create a new page, notice that width / height are in millimeter. Page must contain at least one layer
sourcepub fn add_graphics_state(
&mut self,
added_state: ExtendedGraphicsState
) -> ExtendedGraphicsStateRef
pub fn add_graphics_state( &mut self, added_state: ExtendedGraphicsState ) -> ExtendedGraphicsStateRef
Change the graphics state. Before this operation is done, you should save
the graphics state using the save_graphics_state()
function. This will change the
current graphics state until the end of the page or until the page is reset to the
previous state.
Returns the old graphics state, in case it was overwritten, as well as a reference
to the currently active graphics state
sourcepub fn add_pattern(&mut self, pattern: Pattern) -> PatternRef
pub fn add_pattern(&mut self, pattern: Pattern) -> PatternRef
STUB: Adds a pattern to the pages resources
sourcepub fn add_xobject(&mut self, xobj: XObject) -> XObjectRef
pub fn add_xobject(&mut self, xobj: XObject) -> XObjectRef
STUB: Adds an XObject to the pages resources. NOTE: Watch out for scaling. Your XObject might be invisible or only 1pt x 1pt big
sourcepub fn add_link_annotation(
&mut self,
annotation: LinkAnnotation
) -> LinkAnnotationRef
pub fn add_link_annotation( &mut self, annotation: LinkAnnotation ) -> LinkAnnotationRef
STUB: Adds a Link Annotation to the pages resources.