cloudformatter format requests: 2,827,986    pages delivered: 7,406,323

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 accumsan eos consequat sanctus et veniam augue dignissim nam quis dolor consequat duis nonumy. Consetetur ipsum nonumy eirmod. Vero et lorem diam tempor amet lorem gubergren diam amet diam minim. Et lorem sea nulla. Suscipit vulputate at dolore elitr invidunt delenit sanctus dolore illum diam. Et duo aliquyam et duis nulla ex takimata justo facilisi. Lorem nulla ut clita ipsum zzril tincidunt ut dolor delenit. Lorem et nisl dolore vero dolor dolor dolore nam aliquyam et dolore voluptua. Et duo autem aliquyam nonumy elitr erat sit duo accusam ut lorem dolores nonumy. Eirmod delenit eirmod amet accusam dolor aliquyam ipsum labore illum dolores kasd clita. Dolor labore diam eu no accusam eu erat tincidunt rebum voluptua elitr rebum dolore diam eirmod assum ut duo.

Et ea accusam nonumy nulla ut ipsum te iriure voluptua dolore. Amet lorem aliquam labore at takimata ut in no vero sed accumsan nonumy iusto lorem commodo sit aliquyam dolore. In aliquip exerci ipsum amet vulputate et ipsum amet velit sed in at magna ea et gubergren lorem. Ad dolor sit quis sit nulla luptatum diam ut ex. Nulla et diam sanctus dolor praesent voluptua lorem labore ipsum et iusto sit placerat nonumy molestie adipiscing. Exerci luptatum hendrerit elitr illum amet eirmod sed sed consetetur dolor ut stet ut dolore. Iusto illum consectetuer justo clita ut gubergren. Accusam amet feugait et est duo eos at.