PdfAttachment
class PdfAttachment(val fileName: String, val bytes: ByteArray, val mimeType: String = "application/octet-stream", val description: String? = null)
A file embedded into the produced PDF.
Embedded files travel inside the document so a single PDF can carry a machine-readable companion — the canonical use is a ZUGFeRD / Factur-X invoice that embeds the structured factur-x.xml next to the human-readable pages.
Platform support:
JVM / Desktop (PdfBox) — full support. The file is registered in the document catalog's embedded-files name tree.
iOS / Android — the underlying PDF generators expose no embedded-file API, so attachments are silently skipped on those platforms.