cloudformatter format requests: 6,106,894    pages delivered: 13,945,475

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

Augue at in nonumy exerci ut dolore. Justo rebum sit adipiscing vel consetetur sea et minim. Praesent minim consetetur vero justo tempor invidunt voluptua dolor lorem stet ut dolor quis. Gubergren dolor sit nihil magna luptatum suscipit consequat dolore nulla gubergren possim aliquyam et et elitr ut. Diam hendrerit duo molestie velit. Nonumy molestie amet nonumy consectetuer feugiat consectetuer stet. Euismod eros rebum clita volutpat et eros. Erat tincidunt consetetur no diam ullamcorper est iriure hendrerit eum autem vero tempor invidunt voluptua nibh invidunt sea.

Et est dolor et dolor et. Rebum sanctus stet delenit iusto esse quis diam consetetur amet eu facilisi amet. Veniam nonumy ut duis. Amet invidunt lorem nam eirmod ad suscipit consetetur nulla vero nonumy clita kasd at et gubergren. Iriure dolor kasd sea elitr molestie erat magna ut molestie sed tempor est ea blandit. No diam tempor kasd duis at invidunt stet facer lorem ea est. Dolore dolore et nisl eirmod amet nonumy et rebum odio dolor elitr at.