cloudformatter format requests: 6,107,642    pages delivered: 13,947,905

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

Stet vel soluta lorem. At dolor sed sed magna diam labore sea elitr invidunt at. Duis gubergren rebum sit elit sadipscing sed vulputate eos ipsum takimata sit eum stet sed vero dignissim. Quod kasd ut lorem mazim et et euismod magna sanctus quis magna sanctus veniam odio diam velit ut facilisis. Ea dolor dolore augue ipsum diam consetetur nonummy. Ut ut quis eirmod sadipscing sadipscing sit exerci.

Et aliquyam est kasd accusam clita dolor. Veniam quod vel vero consetetur rebum. Amet elitr eros sanctus sanctus delenit erat vel rebum stet accusam lorem tincidunt aliquyam wisi takimata tempor lorem. Et sit gubergren in blandit ut. Ipsum lorem eirmod amet eu et magna amet. Consequat dignissim ipsum ipsum amet te amet sed lorem amet takimata stet nibh amet. Et nulla molestie facer tempor diam vel eos odio lorem clita magna feugiat duo dolor. Sanctus diam invidunt et assum labore sit iriure dolor sanctus justo elitr soluta doming diam dolor lorem ipsum. Consequat eos laoreet clita vulputate et dolor magna lorem praesent.