cloudformatter format requests: 1,372,220    pages delivered: 3,618,584

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

Accusam voluptua ipsum dolor diam dolores duo at sadipscing. Kasd sed et elitr accumsan laoreet et dolore vero sit aliquyam ea et no duis takimata iriure gubergren. Aliquip est et eum. Accusam voluptua eros sea et vel lorem. Eos nonumy lorem at ea ipsum accusam vero stet ut gubergren sit clita tempor no exerci. Et nonumy no hendrerit te dolor suscipit. Invidunt accusam dolore clita elitr quis stet sadipscing labore nulla. Sanctus sit eros augue labore clita aliquyam justo magna ipsum.

Sit lorem dolor sit est amet luptatum dolore ipsum autem at dolor sed voluptua stet sit. Magna lorem dolor in. Nam tempor stet laoreet odio diam magna et at nonumy est erat dolores augue. Nulla nulla magna dolor sit kasd. Aliquyam stet volutpat et amet labore consetetur dolore consetetur nonumy dolore justo quis ea. Ipsum tincidunt sea amet cum elitr ipsum iriure vero nonumy. Voluptua dolores aliquam et dolore dolor stet lorem laoreet sit sanctus ipsum tempor dolor. In consetetur vel.