Skip to main content

Attachments

The attachment object embeds a file inside the generated PDF. The attached file is stored within the PDF and can be extracted by readers that support PDF attachments (most desktop PDF viewers).

Properties

PropertyTypeDescription
fileNamestringThe display name of the attached file (e.g., "data.csv")
filePathstringPath to the file to embed
descriptionstringHuman-readable description shown in the attachments panel

Examples

Attach a CSV data file

{
"document": {
"attachment": {
"fileName": "revenue_data.csv",
"filePath": "/data/revenue_data.csv",
"description": "Raw revenue data used to generate this report"
},
"content": [
{ "p": "See the attached CSV file for the underlying data." }
]
}
}

Attach supporting documentation

{
"document": {
"metadata": {
"title": "Shipping Manifest",
"author": "Logistics Team"
},
"attachment": {
"fileName": "customs_declaration.pdf",
"filePath": "/docs/customs_declaration.pdf",
"description": "Customs declaration form for cross-border shipment"
},
"content": [
{ "p": "This manifest includes the customs declaration as an attachment." }
]
}
}

Where attachments appear

Attached files are accessible through the PDF viewer's attachments panel (sometimes called "paperclip" panel). In Adobe Acrobat, navigate to View > Show/Hide > Navigation Panes > Attachments.