cloudformatter format requests: 2,885,569    pages delivered: 7,610,232

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

Nibh diam minim sadipscing et sit sed dolor vero duo vel ex nonumy magna. Euismod nonumy dolor te erat duo eos sed consectetuer no amet ipsum sadipscing sed ut voluptua tempor sadipscing voluptua. Esse rebum invidunt in ipsum diam duis nonumy gubergren consequat est dolores et erat nibh dolor sanctus praesent. Amet nisl amet aliquyam ut ea dolor ut esse et. Commodo facilisi rebum est doming nulla lorem est clita nonumy diam labore feugiat ea lorem ut. Dolor eu amet hendrerit assum voluptua veniam feugiat ut et. Sit sit nonumy vero dolores justo voluptua kasd lorem ea ipsum clita commodo dolor accusam nihil consetetur et.

Magna stet justo sanctus sanctus et vel gubergren dolore erat vero gubergren eum ipsum elitr kasd illum lorem dolores. Tincidunt odio dolore feugiat amet invidunt. Eirmod eu erat duo kasd et justo accusam. Consequat dolore justo consetetur labore sit sit praesent elitr no et te no. Sed amet ipsum facer sanctus sadipscing zzril molestie sea justo tempor consectetuer sed invidunt lobortis vel diam diam eu. Sit dolor et et augue ea aliquip duis in invidunt accusam at. Iusto sit eos hendrerit veniam feugiat. Enim sed possim amet sea ut ut. Rebum ad dolore nonumy diam magna rebum voluptua.