From f809ed837cfeaf7805728e6290ab76dd332a5b43 Mon Sep 17 00:00:00 2001 From: Niklas Eicker Date: Wed, 4 Sep 2024 16:41:02 +0200 Subject: [PATCH] Add Catalog method for writing the associated files array (#39) --- .gitignore | 1 + src/structure.rs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index 4df656e..5a8ab3c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ Cargo.lock _things .DS_Store +.idea/ diff --git a/src/structure.rs b/src/structure.rs index 68c1c43..b493e4b 100644 --- a/src/structure.rs +++ b/src/structure.rs @@ -136,6 +136,12 @@ impl<'a> Catalog<'a> { pub fn output_intents(&mut self) -> TypedArray<'_, OutputIntent> { self.insert(Name(b"OutputIntents")).array().typed() } + + /// Start writing the `/AF` array to specify the associated files of the + /// document. PDF 2.0+. + pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec> { + self.insert(Name(b"AF")).array().typed() + } } deref!('a, Catalog<'a> => Dict<'a>, dict);