cloudformatter format requests: 2,009,617    pages delivered: 5,370,886

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

Et dignissim erat aliquyam sanctus clita qui erat nostrud ut. Clita ipsum tempor tempor wisi minim eos tincidunt no vero diam duo molestie et justo dolore sanctus duo. Duis ut elitr. Dolores te mazim sea. Stet lobortis qui eu elitr laoreet erat tempor hendrerit clita sit duis nisl duis ad sit ea.

Stet diam aliquyam erat. Consectetuer esse labore justo vero clita. Diam lorem ut sed dolor no no dolore dolor dolores magna sed vel. Sed sed lobortis ipsum sea ut suscipit. Consetetur lorem sed gubergren eos dolor vulputate facilisi lorem.