I have just started learning Rust and am part way through my first project. I want to be able to update the metadata (title, author, subject, keywords) associated with PDF files. Can anyone advise which (if any) crate might support that?
I've used https://crates.io/crates/lopdf for creating PDFs. In theory you can load your PDF, iterate through it and replace values. You may need those values:
Looking in the spec you referenced, section 14.3.2, it states:
Metadata, both for an entire document and for components within a document, may be stored in PDF streams called metadata streams (PDF 1.4).
:
The contents of a metadata stream shall be the metadata represented in Extensible Markup Language (XML).
:
The format of the XML representing the metadata is defined as part of a framework called the Extensible Metadata Platform (XMP) and described in the Adobe document XMP: Extensible Metadata Platform.