pub struct DocumentInfo<'a> { /* private fields */ }
Expand description
Writer for a document information dictionary.
This struct is created by Pdf::document_info
.
Implementations§
source§impl<'a> DocumentInfo<'a>
impl<'a> DocumentInfo<'a>
sourcepub fn title(&mut self, title: TextStr<'_>) -> &mut Self
pub fn title(&mut self, title: TextStr<'_>) -> &mut Self
Write the /Title
attribute to set the document’s title. PDF 1.1+.
Write the /Author
attribute to set the document’s author.
sourcepub fn subject(&mut self, subject: TextStr<'_>) -> &mut Self
pub fn subject(&mut self, subject: TextStr<'_>) -> &mut Self
Write the /Subject
attribute to set the document’s subject. PDF 1.1+.
sourcepub fn keywords(&mut self, keywords: TextStr<'_>) -> &mut Self
pub fn keywords(&mut self, keywords: TextStr<'_>) -> &mut Self
Write the /Keywords
attribute to set terms associated to the document.
PDF 1.1+.
sourcepub fn creator(&mut self, creator: TextStr<'_>) -> &mut Self
pub fn creator(&mut self, creator: TextStr<'_>) -> &mut Self
Write the /Creator
attribute to set the name of the product that
converted or wrote the file that this PDF has been converted from.
sourcepub fn producer(&mut self, producer: TextStr<'_>) -> &mut Self
pub fn producer(&mut self, producer: TextStr<'_>) -> &mut Self
Write the /Producer
attribute to set the name of the product that
converted or wrote this PDF.
sourcepub fn creation_date(&mut self, date: Date) -> &mut Self
pub fn creation_date(&mut self, date: Date) -> &mut Self
Write the /CreationDate
attribute to set the date the document was
created.
sourcepub fn modified_date(&mut self, date: Date) -> &mut Self
pub fn modified_date(&mut self, date: Date) -> &mut Self
Write the /ModDate
attribute to set the date the document was last
modified.
Required if /PieceInfo
is set in the document catalog.
sourcepub fn trapped(&mut self, trapped: TrappingStatus) -> &mut Self
pub fn trapped(&mut self, trapped: TrappingStatus) -> &mut Self
Write the /Trapped
attribute to set whether the document is fully or
partially trapped. PDF 1.3+.
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.