pub struct Artifact<'a> { /* private fields */ }
Expand description
Writer for an actifact property list dictionary. PDF 1.4+.
Required for marking up pagination artifacts in some PDF/A profiles.
Implementations§
source§impl<'a> Artifact<'a>
impl<'a> Artifact<'a>
sourcepub fn kind(&mut self, kind: ArtifactType) -> &mut Self
pub fn kind(&mut self, kind: ArtifactType) -> &mut Self
Write the /Type
entry to set the type of artifact. Specific to
artifacts. PDF 1.4+.
sourcepub fn subtype(&mut self, subtype: ArtifactSubtype<'_>) -> &mut Self
pub fn subtype(&mut self, subtype: ArtifactSubtype<'_>) -> &mut Self
Write the /Subtype
entry to set the subtype of pagination artifacts.
Specific to artifacts. PDF 1.7+.
sourcepub fn bounding_box(&mut self, bbox: Rect) -> &mut Self
pub fn bounding_box(&mut self, bbox: Rect) -> &mut Self
Write the /BBox
entry to set the bounding box of the artifact.
Specific to artifacts. Required for background artifacts. PDF 1.4+.
sourcepub fn attached(
&mut self,
attachment: impl IntoIterator<Item = ArtifactAttachment>,
) -> &mut Self
pub fn attached( &mut self, attachment: impl IntoIterator<Item = ArtifactAttachment>, ) -> &mut Self
Write the /Attached
entry to set where the artifact is attached to the
page. Only for pagination and full-page background artifacts. Specific
to artifacts. PDF 1.4+.
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.
sourcepub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
pub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value)
.
sourcepub fn pairs<'n, T: Primitive>(
&mut self,
pairs: impl IntoIterator<Item = (Name<'n>, T)>,
) -> &mut Self
pub fn pairs<'n, T: Primitive>( &mut self, pairs: impl IntoIterator<Item = (Name<'n>, T)>, ) -> &mut Self
Write a sequence of pairs with primitive values.