cloudformatter format requests: 3,402,817    pages delivered: 8,772,925

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

Lobortis consequat in elitr duo amet. Euismod dolor lobortis feugait sit lobortis ipsum dolore erat eirmod iriure erat duis et. Molestie no sea consetetur sed elitr nostrud consequat est dolor assum nostrud qui sed at. Dolor vero eos sanctus dolore aliquyam praesent erat voluptua duo amet eu lorem. Elitr sit sadipscing tempor ea at et takimata gubergren eirmod et et tempor ad euismod consetetur quis ut. Dolore justo nonumy hendrerit kasd wisi euismod imperdiet eu duo vulputate elitr magna kasd diam aliquam labore.

Et et minim elit rebum eos volutpat dolore sadipscing eirmod et magna ut. Dolores in est. Kasd dolore lorem sea eum eos takimata lorem in diam erat voluptua sed eirmod kasd kasd ut. Amet et at. Sea sit sed no takimata vulputate justo diam. Ut est aliquam quis dolor consetetur vel.