Struct pdf_writer::writers::FormXObject
source · pub struct FormXObject<'a> { /* private fields */ }
Expand description
Writer for an form XObject stream. PDF 1.1+.
This struct is created by Chunk::form_xobject
.
Note that these have nothing to do with forms that have fields to fill out. Rather, they are a way to encapsulate and reuse content across the file.
Implementations§
source§impl<'a> FormXObject<'a>
impl<'a> FormXObject<'a>
sourcepub fn bbox(&mut self, bbox: Rect) -> &mut Self
pub fn bbox(&mut self, bbox: Rect) -> &mut Self
Write the /BBox
attribute. Required.
This clips the form xobject to coordinates in its coordinate system.
sourcepub fn matrix(&mut self, matrix: [f32; 6]) -> &mut Self
pub fn matrix(&mut self, matrix: [f32; 6]) -> &mut Self
Write the /Matrix
attribute to map form space to user space.
sourcepub fn resources(&mut self) -> Resources<'_>
pub fn resources(&mut self) -> Resources<'_>
Start writing the /Resources
dictionary to specify the resources used
by the XObject. This makes it independent of the parent content stream
it is eventually invoked in. PDF 1.2+.
sourcepub fn group(&mut self) -> Group<'_>
pub fn group(&mut self) -> Group<'_>
Start writing the /Group
dictionary to set up transparency model
parameters and let this XObject be known as a group. PDF 1.4+.
sourcepub fn struct_parent(&mut self, key: i32) -> &mut Self
pub fn struct_parent(&mut self, key: i32) -> &mut Self
Write the /StructParent
attribute to indicate the structure tree
element this XObject belongs to. Mutually exclusive with
Self::struct_parents
. PDF 1.3+.
sourcepub fn struct_parents(&mut self, key: i32) -> &mut Self
pub fn struct_parents(&mut self, key: i32) -> &mut Self
Write the /StructParents
attribute to indicate the structure tree
elements the contents of this XObject may belong to.
Mutually exclusive with Self::struct_parent
. PDF 1.3+.
sourcepub fn reference(&mut self) -> Reference<'_>
pub fn reference(&mut self) -> Reference<'_>
Start writing the /Ref
dictionary to identify the page from an
external document that the XObject is a reference to. PDF 1.4+.
sourcepub fn metadata(&mut self, id: Ref) -> &mut Self
pub fn metadata(&mut self, id: Ref) -> &mut Self
Write the /Metadata
attribute to specify the XObject’s metadata. PDF
1.4+.
The reference shall point to a metadata stream.
sourcepub fn last_modified(&mut self, last_modified: Date) -> &mut Self
pub fn last_modified(&mut self, last_modified: Date) -> &mut Self
Write the /LastModified
attribute. PDF 1.3+.
Methods from Deref<Target = Stream<'a>>§
Methods from Deref<Target = Dict<'a>>§
sourcepub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
pub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
Start writing a pair with an arbitrary value.