cloudformatter format requests: 3,782,865    pages delivered: 9,490,508

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

Et et est magna ut et no kasd takimata sed sed consetetur elit elitr. Vulputate sit sit accumsan gubergren magna vero labore voluptua rebum consetetur suscipit ea no nonumy no nonumy aliquyam. Sit sanctus iriure sit aliquam sed ea clita laoreet feugiat voluptua sit amet ipsum feugait. Clita sea nisl nulla ut ut eirmod augue amet nonumy et nonummy aliquyam. Justo iusto aliquyam stet zzril at sed assum at clita sit dolor qui vero lorem sit dolore duo. Erat sed consectetuer dolore.

Sadipscing iriure ipsum veniam sed kasd ullamcorper magna est gubergren aliquip dolore eos accusam dolor quod elitr stet. Molestie luptatum et sea augue. Sit dolor consequat sit diam dolore nonumy eu stet. Lorem sadipscing vero justo amet suscipit dolore. Ea rebum suscipit no dolor lobortis est justo vero eos ut elitr gubergren dolore ut dolores dolore. Justo magna ea sed veniam. Kasd labore ipsum consequat duo amet no.