pub struct PDResources {
pub dict: COSDictionary,
}Expand description
The Resources dictionary of a page or form XObject (/Resources).
Fields§
§dict: COSDictionaryImplementations§
Source§impl PDResources
impl PDResources
pub fn new() -> Self
pub fn from_dict(dict: COSDictionary) -> Self
Sourcepub fn add_font(&mut self, font_ref: ObjectId) -> String
pub fn add_font(&mut self, font_ref: ObjectId) -> String
Adds a font reference and returns the font resource name (e.g., “F1”).
Sourcepub fn add_xobject(&mut self, prefix: &str, xobj_ref: ObjectId) -> String
pub fn add_xobject(&mut self, prefix: &str, xobj_ref: ObjectId) -> String
Adds an XObject (image or form) reference and returns the resource name (e.g., “Im1”).
Sourcepub fn add_ext_gstate(&mut self, stroke_alpha: f64, fill_alpha: f64) -> String
pub fn add_ext_gstate(&mut self, stroke_alpha: f64, fill_alpha: f64) -> String
Adds an Extended Graphics State (opacity / alpha) and returns resource name (e.g. “GS1”).
Trait Implementations§
Source§impl Clone for PDResources
impl Clone for PDResources
Source§fn clone(&self) -> PDResources
fn clone(&self) -> PDResources
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PDResources
impl Debug for PDResources
Source§impl Default for PDResources
impl Default for PDResources
Source§fn default() -> PDResources
fn default() -> PDResources
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PDResources
impl RefUnwindSafe for PDResources
impl Send for PDResources
impl Sync for PDResources
impl Unpin for PDResources
impl UnsafeUnpin for PDResources
impl UnwindSafe for PDResources
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more