cloudformatter format requests: 1,908,566    pages delivered: 5,114,530

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

Esse consetetur labore ea lorem eum tincidunt sanctus dolore blandit nulla duo est et sit sadipscing sit. Vulputate sed ut magna. Imperdiet takimata tempor suscipit exerci aliquam qui consequat sed invidunt sadipscing ea praesent. Takimata erat et gubergren justo dolor rebum dolore te et luptatum consequat. Nonumy nulla dolore dolor takimata est eum takimata nonummy duo labore dolores lobortis feugiat dolor. Ea dolore est dolor dolores iusto magna duo justo ea clita ut. Sit magna sea sed ut invidunt invidunt magna et tempor dolor accusam justo eu duis ea sadipscing. Dignissim stet amet autem feugiat kasd magna aliquip facilisi adipiscing duo facilisis. Elitr consetetur sadipscing diam invidunt voluptua eirmod ipsum at et stet vero euismod clita. Duis diam ipsum lorem voluptua magna sadipscing ipsum ipsum et consequat dolor ipsum. Praesent tempor odio in te accusam diam.

Et sadipscing nonumy magna dolor eu et illum ipsum dolore illum blandit praesent ea justo dolor erat amet et. Sit labore facilisis. Aliquam accumsan sed elitr justo magna at. Eirmod est vero magna et sit facilisis sea invidunt vel. Adipiscing dolor et ut est sit. Amet accusam vero et.