zh-CN

PR #5221 Embed files associated with the document as a whole

Published At: 2025-01-08 Tags: pr

实现了 PDF 输出中无可见注释的文件嵌入功能.

typ
1
下面的代码会向 PDF 中嵌入一些附件.
2
#pdf.embed("hello.txt")
3
4
可以手动设置多项参数.
5
#pdf.embed("changelog.typ", description: "Source code of this document.", mime-type: "text/plain", relationship: "source")
6
7
也可以从 `bytes` 插入, 并且自定义文件名.
8
#let data = read("hello.txt", encoding: none)
9
#pdf.embed("hello2.txt", data)