mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Add a producer info for the PDF
This commit is contained in:
parent
bfa9962632
commit
d971ac9a8c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user