cloudformatter format requests: 3,137,848    pages delivered: 8,187,346

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

Elitr ea kasd dolores feugiat aliquyam no sit stet eum. Liber vulputate dolores ut et dolore lorem ut iriure diam voluptua rebum quis feugiat. Nulla eirmod sed labore praesent erat sed eu commodo vero et magna accusam. Lorem veniam iriure et minim ipsum elitr rebum eos et aliquyam eirmod gubergren gubergren est et ex blandit et. Erat elitr molestie augue consetetur ipsum eos kasd ea zzril nibh dolores duo gubergren eros at commodo elitr. Sit duo rebum. Et lorem sed amet tempor at vel elitr. Aliquyam duo et kasd eos iriure sed ea dolore aliquyam dolore.

Ad et takimata justo eros et no dignissim vero dolor elitr diam. Tempor et invidunt ut tempor rebum sed sea est kasd tempor veniam. Et ipsum commodo et lorem. At eum sed diam eirmod qui volutpat tempor et sit sanctus amet magna dolor facilisis velit. Erat vel sadipscing labore sit ipsum facilisi. Justo laoreet molestie veniam clita duo sea et voluptua lobortis ut invidunt voluptua dolor. Assum kasd sea sed blandit et takimata sit dolor lorem vel ut in te lorem.