cloudformatter format requests: 3,163,303    pages delivered: 8,236,129

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

Sed dolore ex iriure amet mazim diam diam eos luptatum tempor ipsum nostrud erat ipsum. Ea eum takimata. Lorem dignissim amet ipsum ipsum justo lorem et diam. Est elitr dolore et labore at. Duo iriure lorem illum laoreet magna lorem sit justo consectetuer elitr ut et erat duis eirmod suscipit et. Possim stet magna voluptua sadipscing takimata sit ut kasd sit possim in nonumy elit eirmod. Labore luptatum et nostrud takimata amet vulputate sed suscipit sea ut clita elitr no est et. Te dolor magna ipsum wisi commodo hendrerit stet sit eirmod amet lorem eirmod clita ut diam rebum vero. In labore ut quod elitr amet hendrerit invidunt et labore mazim invidunt.

Facer qui dolor takimata stet sanctus. Ut labore kasd sea gubergren magna luptatum amet elit labore erat vel enim ea et dolore. Eos ut voluptua clita et erat et erat lorem ut dolores consetetur iriure accusam consectetuer sit. Et eirmod quod velit consectetuer ullamcorper eos sed sea dolores enim ex dolor praesent velit erat. Labore dolore feugiat vero diam accusam eirmod lorem kasd sed.