Struct pdf_writer::writers::Catalog
source · 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+.
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+.
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+.
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 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<'_, Dict<'_>>
pub fn output_intents(&mut self) -> TypedArray<'_, Dict<'_>>
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.
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.