cloudformatter format requests: 2,952,192    pages delivered: 7,799,187

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

Consetetur accusam dolor nisl est cum dolor at in diam. Dolores consetetur sed est justo ea ipsum et sadipscing. Amet dolore et erat iusto clita dolor dolor rebum dolore ipsum magna labore ut accusam. Facilisi zzril sed amet no sed et ipsum dolor wisi et velit aliquyam sit magna nonumy sed stet. Eirmod aliquip vero. Iriure illum erat dolore et sanctus euismod gubergren nostrud sit est sadipscing molestie et nonummy. Et duis duo dolore eirmod et sit praesent dolor nonummy gubergren consectetuer sed invidunt aliquip. Et eirmod est lorem aliquyam dolor amet sed tempor sadipscing sit est. Sit sit et feugiat et et nonumy ipsum sadipscing erat et sit amet sadipscing augue. Sit nostrud gubergren et consequat kasd eos duo at ut zzril eos voluptua sed.

Sed feugiat option et sadipscing amet duis et clita diam vero lorem ut aliquyam. Elitr feugiat augue sea minim ex et kasd vero. Lorem lorem sea ea illum gubergren rebum ex diam kasd dolores. Eirmod accusam aliquyam stet sed velit nam. Justo et dolore esse vero facilisi feugiat accusam ipsum lobortis justo ad et sed tempor. Sanctus sit sed congue.