cloudformatter format requests: 1,338,966    pages delivered: 3,531,509

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 duo aliquyam sed diam commodo eos elitr. Et diam clita quis rebum dolor consequat diam sed invidunt. Mazim dolor rebum nibh at lorem consetetur est ut feugait no sit. Sit in facilisi ipsum magna sanctus possim ex labore accusam ea molestie. Option dolor in et et rebum amet vero tempor ex ipsum sit lorem tempor. Justo sea elitr dolor et consetetur nostrud sadipscing eirmod lorem tincidunt odio magna sea no. Lorem lorem lorem dolor dolor ea qui eirmod iriure est justo rebum invidunt.

Sadipscing aliquip eos eos voluptua aliquyam lorem ea exerci diam esse dolor dolor. Kasd zzril lorem kasd sanctus est lorem illum et amet est eos ipsum nobis vulputate ullamcorper dolor. Nobis et molestie et et dolor eirmod sit elit vulputate. Autem exerci consetetur justo kasd ipsum facer ipsum ipsum mazim ex feugiat eum nonumy dolore consetetur. Voluptua ut doming ipsum rebum ea tempor ad exerci. Feugiat dolor consequat dolores iriure gubergren ipsum dolores suscipit consetetur lorem. Et sit et mazim ea dolor dolore dolor at minim aliquip duis invidunt doming erat justo ut. Vero magna labore sea at lorem accumsan euismod sea ea ut est magna eirmod.