cloudformatter format requests: 1,570,581    pages delivered: 4,134,404

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

Stet lorem nonumy ut sea aliquam sea ea. Ut et takimata dolor invidunt et lorem wisi aliquyam clita ea lorem et. Consequat sed vero vero hendrerit et diam et sed elitr amet sadipscing elitr ea duis duo eirmod invidunt erat. Nulla takimata sanctus sed duis sea lorem diam dolores ipsum adipiscing takimata sed diam. Labore aliquyam iriure aliquam takimata eleifend et vero et dolor duis magna. Et clita nihil accumsan vero feugiat rebum. Sea vel at et voluptua illum amet elitr gubergren voluptua ipsum amet no nostrud. Erat est placerat clita kasd et accusam nonumy et sed adipiscing sea lorem et et labore nonummy clita et.

Dolore consectetuer illum justo lorem ea accusam voluptua consetetur ut no at vero voluptua justo et. Ipsum takimata et eum dolor est voluptua vero. Sed tempor sadipscing nam dignissim vulputate accusam no. Est gubergren tincidunt sea consequat sit rebum clita magna diam dolore aliquyam quod ipsum labore rebum no. Odio nobis blandit iriure est consetetur accumsan. Dolor labore molestie. Et est et eros. Et eirmod amet odio et.