diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-12-02 13:48:45 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2024-12-04 10:12:07 +0100 |
| commit | 497446944c78bcf598e8ac8dcdff6c0d0433d844 (patch) | |
| tree | db5c3cfdf09746f41bb85999da9b4dfd5e1afac0 /crates/typst-pdf | |
| parent | d00a5d6c9b35e4a340be8df18a11943e3591b86a (diff) | |
Add `document.description` field
Diffstat (limited to 'crates/typst-pdf')
| -rw-r--r-- | crates/typst-pdf/src/catalog.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/typst-pdf/src/catalog.rs b/crates/typst-pdf/src/catalog.rs index 35c5ce68..753b8cb6 100644 --- a/crates/typst-pdf/src/catalog.rs +++ b/crates/typst-pdf/src/catalog.rs @@ -48,6 +48,11 @@ pub fn write_catalog( xmp.title([(None, title.as_str())]); } + if let Some(description) = &ctx.document.info.description { + info.subject(TextStr::trimmed(description)); + xmp.description([(None, description.as_str())]); + } + let authors = &ctx.document.info.author; if !authors.is_empty() { // Turns out that if the authors are given in both the document |
