pub struct StructTreeRoot<'a> { /* private fields */ }Expand description
Writer for a structure tree root dictionary. PDF 1.3+
This struct is created by Catalog::struct_tree_root.
Implementations§
Source§impl StructTreeRoot<'_>
impl StructTreeRoot<'_>
Sourcepub fn child(&mut self, id: Ref) -> &mut Self
pub fn child(&mut self, id: Ref) -> &mut Self
Write the /K attribute to reference the immediate child of this
element.
Sourcepub fn children(&mut self) -> TypedArray<'_, Ref>
pub fn children(&mut self) -> TypedArray<'_, Ref>
Start writing the /K attribute to reference the immediate children of
this element.
Sourcepub fn id_tree(&mut self) -> NameTree<'_, Ref>
pub fn id_tree(&mut self) -> NameTree<'_, Ref>
Start writing the /IDTree attribute to map element identifiers to
their corresponding structure element objects. Required if any elements
have element identifiers.
Sourcepub fn parent_tree(&mut self) -> NumberTree<'_, Ref>
pub fn parent_tree(&mut self) -> NumberTree<'_, Ref>
Start writing the /ParentTree attribute to maps structure elements to
the content items they belong to. Required if any structure elements
contain content items.
Sourcepub fn parent_tree_next_key(&mut self, key: i32) -> &mut Self
pub fn parent_tree_next_key(&mut self, key: i32) -> &mut Self
Write the /ParentTreeNextKey attribute to specify the next available key
for the /ParentTree dictionary.
Sourcepub fn role_map(&mut self) -> RoleMap<'_>
pub fn role_map(&mut self) -> RoleMap<'_>
Start writing the /RoleMap attribute to map structure element names to
their approximate equivalents from the standard set of types. PDF 1.4+.
For PDF 2.0 documents, note that this mapping maps to the PDF 1.7 roles.
For a namespace-aware role-mapping mechanism, see
Namespace::role_map_ns.
Sourcepub fn class_map(&mut self) -> ClassMap<'_>
pub fn class_map(&mut self) -> ClassMap<'_>
Start writing the /ClassMap attribute to map objects designating
attribute classes to their corresponding attribute objects or arrays
thereof.
Sourcepub fn namespaces(&mut self) -> TypedArray<'_, Ref>
pub fn namespaces(&mut self) -> TypedArray<'_, Ref>
Start writing the /Namespaces attribute to specify the namespaces
occurring in the document. Required if namespaced structure types or
attributes, including the standard namespace for PDF 2.0, are used.
Create these dictionaries with Chunk::namespace PDF 2.0+.
Sourcepub fn pronunciation_lexicon(&mut self) -> TypedArray<'_, Ref>
pub fn pronunciation_lexicon(&mut self) -> TypedArray<'_, Ref>
Start writing the PronunciationLexicon attribute to specify one or
multiple pronunciation lexicons for the document. PDF 2.0+.
The lexicons shall be XML files conforming to the Pronunciation Lexicon
Specification (PLS) Version 1.0. Each entry in the array is an indirect
reference to a FileSpec dictionary for a lexicon file.
Sourcepub fn associated_files(&mut self) -> TypedArray<'_, FileSpec<'_>>
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec<'_>>
Start writing the /AF attribute to specify one or multiple files
associated with the entire structure tree. PDF 2.0+.
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.