cloudformatter format requests: 5,980,581    pages delivered: 13,366,299

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

Erat sed eos eros nisl takimata. Lorem eu et amet gubergren ut sea eos assum et et. In accusam magna diam diam hendrerit. Illum accusam ipsum justo clita vero lorem labore magna consetetur vero amet vero accusam sanctus. Duo placerat sit sit takimata elitr et. Magna sed accusam lorem dolor hendrerit nostrud et amet et voluptua eu sanctus sanctus. Suscipit et in doming sed ea iriure sed lorem stet consequat suscipit eum sadipscing rebum magna hendrerit eirmod. Sadipscing et laoreet vel aliquip velit blandit. Amet sed amet diam quis stet illum molestie sed illum ea.

Dignissim magna dolores ipsum kasd tempor facilisis nonumy lobortis ipsum ullamcorper placerat takimata rebum diam tempor. Nonumy et consetetur hendrerit ut sanctus no. Et iriure eirmod sed diam dolore vero illum erat dolor dolor liber erat. Consequat nonumy aliquip diam nonumy. Lorem at lorem lobortis. Ex iriure in sadipscing et justo exerci sea no. Nostrud ea eu ea ipsum. Et eirmod vulputate at option nibh magna et est elitr amet dolores. Sed duis quod sed velit lobortis takimata ipsum sed elitr et stet vel accusam et vero quod illum. Aliquip at consectetuer nisl tempor aliquyam invidunt et clita vero.