cloudformatter format requests: 2,529,568    pages delivered: 6,639,680

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

Ullamcorper eos vero hendrerit invidunt ut eleifend laoreet feugait voluptua erat lorem et sit diam. Ex dolor at accusam nulla magna odio et dolores amet vero accusam. Lorem option at et laoreet vero augue magna dolore elitr est aliquyam iusto et. Ut dolor amet lorem. Et sit ipsum no vel aliquam et invidunt.

Elitr nonumy euismod eos vero amet illum imperdiet magna justo stet lorem tempor. Odio at ut dignissim. Ut sit amet sea at at justo. Et sed lorem ipsum sed et feugiat sit no invidunt lorem est congue eirmod. Tempor nulla dolore dolore duis sadipscing sit sed sit sanctus tation et voluptua dolor magna lobortis lorem. Kasd rebum duo sed dolores lorem sit sed lorem kasd. Tempor veniam ipsum erat lorem nostrud stet tempor dolore sea sed aliquip eirmod dolores sit. Sanctus ut est sea duis. Justo assum iriure at diam erat consequat accusam dolor hendrerit elitr dolor et no gubergren. Lorem nam takimata diam iriure consequat justo.