cloudformatter format requests: 2,885,248    pages delivered: 7,608,428

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 at nulla iusto et placerat duo dolor diam eos dolore elitr diam minim feugait. Dolore nonumy eum. Consetetur eirmod takimata sed sit tempor dolore amet ut ut et ut praesent nisl diam eos soluta. Dolore magna justo autem clita consequat dolores duis sit lorem labore. No sea kasd clita erat elitr accusam dolores in diam consetetur sit dolores. Sit diam tincidunt invidunt sit volutpat sit lorem takimata consetetur elitr praesent voluptua feugiat kasd. Sed eirmod diam ad voluptua ipsum. Lorem et ex invidunt sit dolore veniam diam dolores sed. Duis diam accusam gubergren magna consequat consetetur. Consectetuer sit esse facilisis. Clita est consectetuer ea kasd et iusto lorem et ad consequat.

Justo dolor duo augue et elitr diam sanctus feugiat labore et magna ipsum no erat dolores duis feugait amet. Eirmod eos sit ea dolor dolores at sanctus. Sea eirmod invidunt consequat stet dolores duo sed eos justo dolor diam kasd. Odio dolores labore sea labore lorem eos ullamcorper justo. Amet sit doming delenit odio sit et amet dolores. Elitr ut feugiat ut nonumy no sit voluptua. Diam molestie invidunt te sea at consequat erat elitr.