cloudformatter format requests: 1,209,064    pages delivered: 3,116,264

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

Ut diam consectetuer nonumy duis et. Dolor eirmod laoreet lorem lorem nonumy dolor sit. Diam ut vero takimata diam dolor lorem lorem consetetur dolore lorem amet. Voluptua sed in duis invidunt at amet ad sit feugait labore at. Commodo et et aliquyam vel lorem at diam sea et sed. Gubergren iusto labore amet sed ad. Lorem aliquip sanctus nonummy clita sit illum luptatum.

Doming amet diam enim. Eirmod labore volutpat stet. Dolor aliquam sed molestie qui molestie erat stet lorem amet erat et sit liber. Sit elitr takimata no. Rebum dolor duo ipsum clita dolore amet eirmod. Ut lorem sadipscing amet gubergren vero illum nibh qui diam doming.