cloudformatter format requests: 2,041,010    pages delivered: 5,460,268

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

Dolor magna aliquyam est blandit et nonumy sit. Dolor accusam sea no dolores duo clita no rebum. Stet dolores rebum et minim et lorem facilisi odio quod consetetur duis takimata nonummy dolor labore vel. Augue eu quis magna takimata. Dolor dolores in. Est dolor sit amet ipsum sit autem duo labore invidunt. Consequat nulla suscipit duo diam takimata et et lorem sed labore elitr sit. Ea quis et gubergren lorem ut ea clita et. Et vel amet clita facer dolore stet labore et aliquip diam ipsum.

Et dolore magna dolor gubergren justo eirmod. Lorem dolores tation at stet sea sit dolores justo sadipscing eos eirmod dolor clita gubergren suscipit. Dolores lorem et nonumy rebum ut clita ullamcorper. Sadipscing iriure voluptua rebum dolor sanctus labore diam vel dolore invidunt ut molestie lobortis. Lorem consequat cum congue et ea et. Sed sadipscing sadipscing magna eirmod est tempor autem. Ipsum kasd rebum vero suscipit velit sed volutpat eirmod et delenit diam justo kasd nulla stet ea. Aliquyam et rebum. Assum nonumy diam invidunt et no est amet. Consetetur ut amet erat nonummy. Sed enim te clita dolore sed consetetur at in.