fschutt / printpdf

An easy-to-use library for writing PDF in Rust
https://docs.rs/printpdf/
MIT License
802 stars 96 forks source link

Is there a way to specify the author of the PDF file? #95

Closed jwir3 closed 2 years ago

jwir3 commented 3 years ago

I'm wondering if there is a way to specify additional metadata, such as the author of the PDF file, prior to generation.

fschutt commented 3 years ago

You would have to set that in the DocumentInfo dictionary: https://github.com/fschutt/printpdf/blob/097defa25d5d5a14520498043a30979fe4af8bba/src/types/plugins/misc/document_info.rs#L17-L24

... but that's not currently exposed in printpdf. It's not that hard to implement, but I have a lot to do myself right now