Struct printpdf::types::pdf_page::PdfPageReference
source · pub struct PdfPageReference {
pub document: Weak<RefCell<PdfDocument>>,
pub page: PdfPageIndex,
}
Expand description
A “reference” to the current page, allows for inner mutability but only inside this library
Fields§
§document: Weak<RefCell<PdfDocument>>
A weak reference to the document, for inner mutability
page: PdfPageIndex
The index of the page this layer is on
Implementations§
source§impl PdfPageReference
impl PdfPageReference
sourcepub fn add_layer<S>(&self, layer_name: S) -> PdfLayerReferencewhere
S: Into<String>,
pub fn add_layer<S>(&self, layer_name: S) -> PdfLayerReferencewhere
S: Into<String>,
Adds a page and returns the index of the currently added page
sourcepub fn get_layer(&self, layer: PdfLayerIndex) -> PdfLayerReference
pub fn get_layer(&self, layer: PdfLayerIndex) -> PdfLayerReference
Validates that a layer is present and returns a reference to it