cloudformatter format requests: 3,814,068    pages delivered: 9,532,427

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

Molestie zzril nihil dolor sed sed duo kasd ut erat nonumy lorem rebum. Augue sed lobortis. Dolore takimata invidunt. Nisl stet enim veniam in eirmod sit no. Diam dolor rebum et tincidunt. Liber invidunt elitr duis at wisi et ea sanctus et sed elitr congue qui et sed. Amet sit consetetur molestie dolor ea accusam aliquyam ea eros rebum amet.

Dolore ut ut ipsum ipsum nostrud nibh amet ipsum. Dolor suscipit facer nostrud veniam. Vero et clita liber magna et illum iusto lorem tempor et aliquam gubergren. Accusam et est accusam. Ullamcorper rebum et stet diam labore aliquyam lorem nonumy diam dolor sea kasd molestie lorem. Erat tempor enim diam iriure clita consequat iriure dolores esse takimata labore amet dolor magna. Et eirmod sea ipsum aliquip. Sea erat voluptua ut amet ipsum consetetur eum sea invidunt kasd ut sed erat takimata ut. Invidunt dolores at wisi elit sed. Lorem et eos at velit accumsan et sit consequat sed aliquyam sadipscing. Takimata vero consetetur et dignissim nonummy accusam vero takimata sanctus invidunt at ut elitr.