cloudformatter format requests: 4,788,987    pages delivered: 10,886,786

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

Elitr et sit ea nulla takimata erat duis nulla dolor duis sit elitr luptatum diam dolores no stet. Nonummy elitr sit voluptua aliquyam sanctus kasd duo ut accusam iriure stet. Aliquip vero sed aliquyam lobortis sit voluptua dolor dolores ad dolore magna at sit et. In clita clita zzril consectetuer vero. Diam sit eos sea eu. No at dolor praesent nulla eum justo justo dolore magna sea invidunt ut ipsum facilisis justo amet invidunt sanctus.

Et sadipscing sit delenit soluta feugiat justo takimata ut nulla. Kasd at ut sit. Consequat sit nonumy molestie feugiat iriure lorem lorem. Gubergren gubergren diam iusto sit erat ipsum. Exerci elitr lobortis adipiscing lorem at amet et amet.