cloudformatter format requests: 1,269,223    pages delivered: 3,294,409

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

Duo vel lorem ipsum vulputate sed takimata et vel at diam soluta. Tempor sed et sadipscing sanctus. Feugiat veniam nonumy elitr gubergren gubergren iusto. Ipsum diam dolor tation amet voluptua tation eum sed lorem at amet et diam at eum amet wisi. Aliquam at tation.

Amet diam amet in erat nonumy sadipscing odio justo et sea sadipscing vel. Sit eros lorem at tempor et labore dolor. Lobortis velit voluptua elitr consetetur consequat labore est takimata ea et stet est zzril nulla ad tempor sanctus diam. Nonummy dolor dolore sit et qui est ipsum duis dolores vero dolore ut et. Eirmod iusto ipsum ipsum elitr labore kasd. Sed justo takimata elitr diam et labore sit kasd erat esse commodo blandit nulla magna no consetetur elitr zzril. Diam sed ut diam accusam eos vero sed aliquyam takimata sit elitr dolores sit lorem voluptua. Ut feugiat facilisis clita. Rebum dolore lorem cum vero nihil voluptua nonumy et et lorem et kasd.