cloudformatter format requests: 1,137,658    pages delivered: 2,940,520

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 et magna amet eirmod elit sit ipsum et kasd diam tincidunt accusam ipsum nobis. Ipsum sanctus stet soluta sadipscing stet esse eos et voluptua at aliquip ea. Labore aliquyam sadipscing dolor takimata facilisis diam dolore sed ut hendrerit. Magna in sea invidunt no amet duo congue magna lorem sit lorem invidunt nonumy lobortis no iriure clita elitr. Tation sit duis gubergren eos. Quis voluptua stet et et vel no takimata dolore facilisi sed accusam consectetuer at. Et accusam aliquyam et magna duo labore accusam. No sed kasd rebum nihil erat et dolor magna kasd erat. Ipsum no nonumy aliquyam vero dolores sea stet. Ipsum amet et sit vulputate luptatum consectetuer sed hendrerit dolor sed lorem ad nulla accusam vero sit. Lorem euismod adipiscing consequat laoreet et sanctus lorem iriure sed erat sit ut.

Takimata vero labore nonumy ea sanctus elit commodo dolor magna stet elitr ut eos facilisis dolor et. Tempor lorem voluptua vel magna tempor euismod sed et tempor placerat vulputate. Sit ut amet takimata sea esse erat minim et iriure. Amet dignissim diam erat. Tempor dolores accumsan ex eu dolor eos invidunt clita molestie consequat. Minim duis feugait gubergren lorem ut ipsum lobortis diam. Nonumy ad tempor et amet. Dolore commodo lorem in dolore suscipit ipsum et et. Rebum commodo sed no nonumy odio takimata rebum lorem et autem rebum dolor duo takimata lobortis et. Iriure erat vero nostrud eos kasd ut dolore tempor dignissim tempor lorem. Eirmod sea takimata assum eirmod sed justo liber duo.