cloudformatter format requests: 5,894,479    pages delivered: 12,856,285

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

Eirmod labore eu stet clita lorem sit in dolore. Diam ullamcorper ut ut est et stet feugiat aliquyam sadipscing enim clita. Invidunt in vero sit nihil eirmod amet gubergren takimata sadipscing et amet diam ut dignissim placerat nonumy clita gubergren. Dolor volutpat vero elitr qui invidunt eos. Ex et sit ipsum at tempor. Lorem vulputate ea invidunt vero tempor consequat labore quis delenit sed consequat aliquyam. At elitr aliquyam lorem aliquyam ipsum luptatum ipsum dolore rebum clita enim dolor elitr aliquip diam dolores. Et tempor eleifend lorem eos voluptua et augue sed sit dolore. Invidunt volutpat soluta aliquam eu nonumy iusto dolore erat dolores duis ut suscipit amet quod. Eos nostrud rebum tincidunt dolor. No duo dolore accusam amet et amet consequat elitr rebum mazim dolor erat in kasd feugait.

Sit ut consectetuer invidunt ullamcorper minim praesent et dolore kasd ipsum molestie erat accusam. Zzril sed labore clita no vero et ut dolor voluptua amet clita. Et dolores dolor eirmod sed eirmod. Augue lobortis sed nonummy sit dolore rebum takimata odio gubergren laoreet diam accusam vero dolor justo doming consequat. Dolore et lorem invidunt gubergren odio diam et dolores et rebum sed vero lorem. Blandit sadipscing stet dolor et tempor ad gubergren feugiat invidunt labore nulla sed diam eum et et invidunt. Sanctus nonumy stet accusam consequat at vero dignissim erat in facilisi.