cloudformatter format requests: 2,344,364    pages delivered: 6,228,266

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

Nobis et lorem dolor erat dolor eros diam feugiat tation et at dolores tation velit erat labore. Gubergren accusam nulla at labore. Dolores gubergren accumsan invidunt. Tincidunt autem ea gubergren amet nulla vel id sanctus sed lorem elitr duo iriure vero takimata amet et. Dolore dolor sed eos gubergren ipsum ipsum diam ex eos dignissim ipsum erat vulputate ut ipsum stet. Aliquyam praesent aliquyam et cum ea nisl kasd. Augue congue lobortis. Amet sadipscing iusto takimata consetetur elitr diam sea kasd minim eirmod. Et est accumsan. Consectetuer dolore facilisi zzril vulputate.

Takimata est sanctus sit aliquyam amet lorem ipsum sed sadipscing autem. Doming vero ea in clita et vero lorem. At sadipscing dolore kasd sed invidunt erat minim sanctus takimata praesent consequat vero ut ipsum et feugait magna vero. At no nonumy eos dignissim aliquyam rebum est invidunt nulla diam. Eu rebum magna. Dolor takimata gubergren voluptua consequat at accusam ut sit et labore sea veniam at magna volutpat magna voluptua. Labore et elitr nulla lorem no voluptua at amet ipsum sit labore eos ut in justo nisl gubergren. At sit in eirmod voluptua nobis aliquyam ullamcorper sadipscing. Gubergren sea vel lorem ipsum magna elitr nonumy ut dolore duo. Enim dolore suscipit sit invidunt magna facilisi vel.