en

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

Published At: 2025-01-08 Tags: pr

Implemented file embedding functionality in PDF output without visible annotations.

typ
1
The following code will embed attachments in the PDF.
2
#pdf.embed("hello.txt")
3
4
Multiple parameters can be manually configured.
5
#pdf.embed("changelog.typ", description: "Source code of this document.", mime-type: "text/plain", relationship: "source")
6
7
You can also insert from `bytes` with a custom filename.
8
#let data = read("hello.txt", encoding: none)
9
#pdf.embed("hello2.txt", data)