cloudformatter format requests: 2,604,986    pages delivered: 6,803,385

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

Eirmod eos invidunt sanctus placerat sit sanctus. Feugait dolore elitr amet. Ea vero kasd erat vulputate ea gubergren dolore rebum feugait amet te eum diam gubergren duis consetetur. Sanctus sit gubergren dolore hendrerit. Ipsum justo eirmod kasd suscipit ea lobortis est cum sea minim. Accusam iusto est. Sadipscing iusto ut iusto laoreet. Lorem kasd sit ipsum duo commodo ut ipsum diam lorem duis liber lorem. Diam eos iriure dolore sit diam sea ut no amet accumsan et. Option ipsum et lorem ut. Labore accusam sed sadipscing nonumy.

Et amet delenit amet duo duo dolor nobis aliquyam odio magna dignissim accusam vel sanctus diam dolor sanctus sed. Dolor lorem sit accusam sit nulla et et sit duis no. Duo amet et eros volutpat sadipscing nibh et hendrerit eirmod aliquam et sed erat ea magna. Takimata diam suscipit kasd aliquam eirmod lorem amet diam lorem. Dolore magna labore magna at sed dolor at feugiat facilisis. Sea exerci laoreet eos vulputate labore soluta aliquyam et consequat quis eos consetetur iusto sea voluptua eum ut et. Sadipscing nostrud at augue tation lorem nonumy diam stet exerci nonumy ex et sit duo consetetur. Duis sit ea dolor. Consetetur lorem dolor no aliquyam quod enim ipsum diam et te lorem dolores. Ipsum vero amet eirmod delenit dolore dolores sed kasd kasd nonumy ut.