Skip to content

Commit

Permalink
Add ID element to struct elem (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenzV authored Oct 30, 2024
1 parent 7287eb1 commit 9a25d60
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,13 @@ impl<'a> StructElement<'a> {
self
}

/// Write the `/ID` attribute to specify the element identifier of this
/// structure element.
pub fn id(&mut self, id: Str) -> &mut Self {
self.dict.pair(Name(b"ID"), id);
self
}

/// Write the `/Pg` attribute to specify the page some or all of this
/// structure element is located on.
pub fn page(&mut self, page: Ref) -> &mut Self {
Expand Down

0 comments on commit 9a25d60

Please sign in to comment.