From 57f1115c1011f195365aaa97e1a96d4754bafcc7 Mon Sep 17 00:00:00 2001 From: Laurenz Stampfl <47084093+LaurenzV@users.noreply.github.com> Date: Mon, 28 Oct 2024 23:00:35 +0100 Subject: [PATCH] Add ID element to struct elem --- src/structure.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/structure.rs b/src/structure.rs index a5def42..2c24e07 100644 --- a/src/structure.rs +++ b/src/structure.rs @@ -389,6 +389,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 {