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<'a> StructTreeRoot<'a>
impl<'a> StructTreeRoot<'a>
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.
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.