cloudformatter format requests: 3,507,155    pages delivered: 9,001,365

PDF File Attachments

xportability LLC

PDF File Attachments


You can insert a file attachment into a PDF document using a special tag pdf-attachment. There are two required attributes filename used as a simple name of the file inside the PDF and href which is a reference to the file you wish to insert. You should use an appropriate filename with extension so that it will open using the associated application.

<pdf-attachment filename="data.xlsx" href="/Resources/Attachments/data.xlsx"/>

The file data.xlsx is attached inside this PDF here using the code above. We've used a little CSS to style the <pdf-attachment> tag:

Notice: If you are using some browser-based viewer like Chrome, you probably will not see attachments. It is because that product does not support them. Download the PDF locally and use a PDF viewer that supports them.

Sample Heading

Eirmod autem diam dolor ut consetetur voluptua aliquyam et nisl. Stet sea duis elit no dolores erat nonumy sanctus tempor sed. Diam et tempor et sed amet nonumy sed. Amet ipsum sit ipsum hendrerit et et sea est duis est dolores. Ea kasd ipsum invidunt feugiat odio no ea tempor in at.

Aliquyam aliquam et. Sit elitr lorem diam elitr sanctus gubergren kasd amet magna stet magna. No tempor sed labore dolor voluptua justo sanctus dolore nulla et duo elitr minim facilisis elitr. Nonumy et invidunt accusam kasd rebum. Ea et est diam ipsum dolore accumsan erat diam aliquam amet lorem minim odio erat sadipscing.