pub struct PdfResources {
    pub xobjects: XObjectList,
    pub patterns: PatternList,
    pub graphics_states: ExtendedGraphicsStateList,
    pub layers: OCGList,
}
Expand description

Struct for storing the PDF Resources, to be used on a PDF page

Fields§

§xobjects: XObjectList

External graphics objects

§patterns: PatternList

Patterns used on this page. Do not yet, use, placeholder.

§graphics_states: ExtendedGraphicsStateList

Graphics states used on this page

§layers: OCGList

Layers / optional content (“Properties”) in the resource dictionary

Implementations§

Creates a new PdfResources struct (resources for exactly one PDF page)

Add a graphics state to the resources

Adds an XObject to the page

STUB: Adds a pattern to the resources, to be used like a color

See XObject::Into_with_document. The resources also need access to the layers (the optional content groups), this should be a Vec<lopdf::Object::Reference> (to the actual OCG groups, which are added on the document level)

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sets value as a parameter of self.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.