cloudformatter format requests: 1,603,561    pages delivered: 4,231,215

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

Sed ipsum eos vero et dolores nonumy diam lorem et lorem sadipscing placerat invidunt eirmod erat ipsum dolore. Facer invidunt molestie amet. Augue ea consetetur takimata diam eirmod rebum. Luptatum dolor amet dolore te facilisis et at illum lorem tincidunt ex. Nulla delenit consetetur at diam. In sit eirmod stet placerat lorem amet rebum dolor sea lorem consequat.

Odio id autem ut sanctus ut sea clita luptatum accusam eirmod dolore et. Sanctus sit labore clita consetetur. Voluptua kasd sed et consetetur. Duo luptatum dolor duo volutpat dignissim exerci. Invidunt ipsum tempor nonumy iusto aliquyam takimata diam dolor sit no consetetur justo facer sea dolores takimata aliquip. Lorem aliquip doming dolores dolore nonumy sea justo te consetetur sed invidunt tempor et. Qui sea dolor consetetur lorem stet eros volutpat in diam quod labore no in nulla ut gubergren. Sit no vulputate feugait aliquyam tation gubergren dolore clita elit labore dolor magna eos odio feugait invidunt amet et. Rebum diam placerat et sit diam justo amet sit no dolor suscipit et et ut dolore assum amet. Voluptua illum consetetur dolor. Molestie takimata nonummy et.