summaryrefslogtreecommitdiff
path: root/src/export/pdf.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/export/pdf.rs')
-rw-r--r--src/export/pdf.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/export/pdf.rs b/src/export/pdf.rs
index 94386c99..d3e5b33e 100644
--- a/src/export/pdf.rs
+++ b/src/export/pdf.rs
@@ -9,7 +9,9 @@ use image::{DynamicImage, GenericImageView, ImageFormat, ImageResult, Rgba};
use pdf_writer::types::{
ActionType, AnnotationType, CidFontType, ColorSpace, FontFlags, SystemInfo,
};
-use pdf_writer::{Content, Filter, Finish, Name, PdfWriter, Rect, Ref, Str, UnicodeCmap};
+use pdf_writer::{
+ Content, Filter, Finish, Name, PdfWriter, Rect, Ref, Str, TextStr, UnicodeCmap,
+};
use ttf_parser::{name_id, GlyphId, Tag};
use super::subset;
@@ -312,6 +314,11 @@ impl<'a> PdfExporter<'a> {
resources.finish();
pages.finish();
+ // The document information.
+ let mut doc_info = self.writer.document_info(self.alloc.bump());
+ doc_info.creator(TextStr("Typst"));
+ doc_info.finish();
+
// The document catalog.
let catalog_ref = self.alloc.bump();
self.writer.catalog(catalog_ref).pages(page_tree_ref);