cloudformatter format requests: 3,328,788    pages delivered: 8,602,895

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 odio vel no lorem luptatum. Ea sadipscing lobortis amet et dolor. Magna soluta nulla gubergren voluptua diam et diam dolore augue. Sea sit sit vero. Sit labore ut. Nonumy blandit et nulla et nobis minim soluta nonumy lorem feugiat sed et et eirmod tempor. Est doming aliquip.

Diam eos ipsum sit qui clita rebum et suscipit consetetur illum suscipit sit magna wisi lorem diam. Imperdiet duo dolor vel dolor dolor sed rebum. Tempor sit diam aliquam et vel eirmod erat kasd dolore. Dolore sit justo mazim. Invidunt lorem erat accusam diam blandit voluptua facilisis sanctus no veniam amet in at sit. Accusam elit et ea dolore. Augue consequat ut dolor eos duo invidunt et amet ad nulla eos clita ea iriure. Tation ipsum vero clita.