pub struct Catalog<'a> { /* private fields */ }
Expand description
Writer for a document catalog dictionary.
This struct is created by Pdf::catalog
.
Implementations§
source§impl<'a> Catalog<'a>
impl<'a> Catalog<'a>
sourcepub fn pages(&mut self, id: Ref) -> &mut Self
pub fn pages(&mut self, id: Ref) -> &mut Self
Write the /Pages
attribute pointing to the root page tree.
sourcepub fn page_layout(&mut self, layout: PageLayout) -> &mut Self
pub fn page_layout(&mut self, layout: PageLayout) -> &mut Self
Write the /PageLayout
attribute to determine how the viewer will
display the document’s pages.
sourcepub fn page_labels(&mut self) -> NumberTree<'_, Ref>
pub fn page_labels(&mut self) -> NumberTree<'_, Ref>
Start writing the /PageLabels
number tree. PDF 1.3+.
sourcepub fn page_mode(&mut self, mode: PageMode) -> &mut Self
pub fn page_mode(&mut self, mode: PageMode) -> &mut Self
Write the /PageMode
attribute to set which chrome elements the viewer
should show.
sourcepub fn viewer_preferences(&mut self) -> ViewerPreferences<'_>
pub fn viewer_preferences(&mut self) -> ViewerPreferences<'_>
Start writing the /ViewerPreferences
dictionary. PDF 1.2+.
sourcepub fn destinations(&mut self, id: Ref) -> &mut Self
pub fn destinations(&mut self, id: Ref) -> &mut Self
Write the /Dests
attribute pointing to a
named destinations dictionary. PDF 1.1+.
sourcepub fn outlines(&mut self, id: Ref) -> &mut Self
pub fn outlines(&mut self, id: Ref) -> &mut Self
Write the /Outlines
attribute pointing to the root
outline dictionary.
sourcepub fn struct_tree_root(&mut self) -> StructTreeRoot<'_>
pub fn struct_tree_root(&mut self) -> StructTreeRoot<'_>
Start writing the /StructTreeRoot
attribute to specify the root of the
document’s structure tree. PDF 1.3+.
Must be present in some PDF/A profiles like PDF/A-2a.
sourcepub fn mark_info(&mut self) -> MarkInfo<'_>
pub fn mark_info(&mut self) -> MarkInfo<'_>
Start writing the /MarkInfo
dictionary to specify this document’s
conformance with the tagged PDF specification. PDF 1.4+.
Must be present in some PDF/A profiles like PDF/A-2a.
sourcepub fn lang(&mut self, lang: TextStr<'_>) -> &mut Self
pub fn lang(&mut self, lang: TextStr<'_>) -> &mut Self
Write the /Lang
attribute to specify the language of the document as a
RFC 3066 language tag. PDF 1.4+.
Required in some PDF/A profiles like PDF/A-2a.
sourcepub fn version(&mut self, major: u8, minor: u8) -> &mut Self
pub fn version(&mut self, major: u8, minor: u8) -> &mut Self
Write the /Version
attribute to override the PDF version stated in the
header. PDF 1.4+.
sourcepub fn additional_actions(&mut self) -> AdditionalActions<'_>
pub fn additional_actions(&mut self) -> AdditionalActions<'_>
Start writing the /AA
dictionary. This sets the additional actions for
the whole document. PDF 1.4+.
Note that this attribute is forbidden in PDF/A.
sourcepub fn form(&mut self) -> Form<'_>
pub fn form(&mut self) -> Form<'_>
Start writing the /AcroForm
dictionary to specify the document wide
form. PDF 1.2+.
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 document’s metadata. PDF
1.4+.
The reference shall point to a metadata stream.
sourcepub fn extensions(&mut self) -> TypedDict<'_, DeveloperExtension<'_>>
pub fn extensions(&mut self) -> TypedDict<'_, DeveloperExtension<'_>>
Start writing the /Extensions
dictionary to specify which PDF
extensions are in use in the document. PDF 1.5+.
The dictionary maps a vendor name to an extension dictionary. The Adobe
PDF extensions use the Name prefix ADBE
.
sourcepub fn separation_info(&mut self) -> SeparationInfo<'_>
pub fn separation_info(&mut self) -> SeparationInfo<'_>
Start writing the /SeparationInfo
dictionary to specify which
separation colors are in use on the page and how it relates to other
pages in the document. PDF 1.3+.
sourcepub fn output_intents(&mut self) -> TypedArray<'_, OutputIntent<'_>>
pub fn output_intents(&mut self) -> TypedArray<'_, OutputIntent<'_>>
Start writing the /OutputIntents
array to specify the output
destinations for the document. PDF 1.4+.
Each entry in the array is an output intent dictionary.
Must be present in PDF/X documents, encouraged in PDF/A documents.
sourcepub fn associated_files(&mut self) -> TypedArray<'_, FileSpec<'_>>
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec<'_>>
Start writing the /AF
array to specify the associated files of the
document. PDF 2.0+ or PDF/A-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.