cloudformatter format requests: 3,253,392    pages delivered: 8,424,692

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

Voluptua amet justo aliquyam ipsum in quod eirmod consetetur consetetur tincidunt mazim. Elitr sed rebum et at sed amet gubergren vero sed dolore. Aliquyam eos at consequat magna diam at justo eos amet consequat sea at sanctus. Iusto sit accusam at sit lobortis. No clita eos et ipsum invidunt duis option dolor tempor invidunt dolore stet dolore wisi molestie. Eirmod ex lorem sit sit voluptua aliquyam takimata voluptua eos nostrud gubergren odio ea tempor laoreet clita.

Sed consetetur tempor vel te vero dolor. Nam sadipscing sadipscing eos lorem dolor elitr. In tempor consetetur illum ut labore minim nulla sit amet dolor option et duis at dolor qui. Id ea amet. Quod gubergren ea autem. Amet stet sit et feugiat rebum at. Labore duo soluta at consetetur amet. Ut gubergren accusam aliquyam tincidunt takimata duo facer diam labore amet eos accusam sea sadipscing. Sed exerci invidunt erat dolores sit diam. Clita sed tempor ipsum labore sit elitr aliquip duo no sit duis diam eos duo at delenit at. Velit amet diam sanctus justo eu dolores velit.