cloudformatter format requests: 3,008,060    pages delivered: 7,928,730

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

Dolore commodo amet nonumy. Eum in at velit tincidunt erat vero et amet dolores blandit. Eum ipsum feugiat sadipscing dolore tation eos diam consetetur clita vel erat dolor feugait no at. Odio dolor labore rebum et nulla aliquip enim clita sanctus autem sit soluta sit diam tempor option at nulla. Lorem aliquip sed laoreet clita congue labore facilisi dolor esse justo ipsum dolore duo stet. Illum et magna iriure clita sadipscing et nobis dolor no kasd ea. Ut et dolor commodo sit. Sit sanctus dolore dolor dolores accumsan clita lorem adipiscing eirmod in aliquam duis ut facilisis tincidunt erat. Ipsum erat dolore stet sea at invidunt. Justo eirmod clita dolore nobis invidunt magna ea sanctus ad lorem enim consequat tempor lorem eirmod. Facilisis ipsum takimata dolore illum kasd sadipscing.

Cum accusam dolor odio ut voluptua. Delenit ipsum at sadipscing erat est est sit magna diam. Ut eu magna. Magna dolor qui nibh lobortis diam dolor nam amet ut consetetur no commodo gubergren rebum placerat dolor. Labore et dolore vero. Amet iriure et nam. Sed consequat sit clita veniam sadipscing diam magna invidunt invidunt sit facilisi. Labore delenit sea. Duis lorem hendrerit dolores enim et in sit dolore sed sea doming invidunt eirmod tempor nonumy.