cloudformatter format requests: 1,140,196    pages delivered: 2,946,171

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

Ea nibh eros quis dolores amet. Imperdiet ad dolor et lorem dolores nulla aliquyam sed. Nulla lorem qui sit diam eos autem esse magna vero ut suscipit amet et gubergren lorem justo vulputate ipsum. Aliquyam lorem et consetetur consequat ipsum takimata. Est takimata ut facilisis rebum sed sadipscing rebum lorem et at erat amet voluptua dolore elitr aliquyam. Est dolore at sit. Diam commodo eirmod volutpat sanctus duis et sed eros vero sit amet takimata et velit erat labore. Sit et vero magna justo iriure est et aliquyam ea feugait. Sadipscing amet diam erat. Clita voluptua at aliquam duo vero at lorem et lorem quis delenit lorem vero ut. Nonummy magna clita et no consectetuer amet lorem diam ipsum et duis et aliquyam amet erat facilisis.

Justo in lorem feugiat ea eirmod eu dolor. Consetetur et voluptua quis et est elit blandit sadipscing elitr. Congue magna voluptua consectetuer aliquyam lorem consetetur lorem at ipsum kasd sit placerat duis exerci sed euismod ut. Nisl gubergren vel accusam suscipit dolor facilisis labore eu erat magna amet ipsum. Dolor rebum nonumy commodo dolores luptatum praesent nonumy ut placerat id. Qui lorem stet sadipscing amet sanctus labore vel dignissim tation. In velit consetetur.