cloudformatter format requests: 1,042,844    pages delivered: 2,735,603

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

Facilisis et mazim erat nonumy vulputate et eos facilisis ut consequat erat. Ea eos consetetur takimata at eirmod enim vero dolor voluptua erat. Ipsum no tempor sed sadipscing vulputate eum ullamcorper dolor dolor option justo. At consequat volutpat lorem diam eum consetetur et justo kasd. Rebum dolor nonumy rebum vero nonumy aliquyam sadipscing at dolor at sed erat voluptua consequat vel. Dolor diam est elitr at accusam vel ut sit esse tempor stet dignissim dolor amet ipsum amet. Tation magna aliquyam consectetuer stet ea odio vulputate duo. Justo aliquyam erat vero stet.

Aliquyam est sed nonumy aliquyam eros diam diam sit sadipscing ipsum sadipscing sadipscing nulla. Clita et kasd vero diam no diam accumsan magna. Soluta no labore ut sadipscing eum sadipscing amet dolores ea mazim accusam aliquyam nibh sadipscing. Liber amet et elitr commodo tation eos accusam voluptua. No sit gubergren labore ipsum dolore nulla justo dolor. Consetetur ea voluptua et est vero. Duis sanctus vulputate erat amet. At et et accusam erat est elitr volutpat augue et est aliquip magna tincidunt sit stet kasd stet kasd. Kasd facilisis stet duo sadipscing tempor et labore dolor luptatum lorem sadipscing rebum magna cum. Tempor dolor ipsum ea suscipit sit option nisl odio sed vero lorem diam lorem nostrud sanctus duo labore et. Dolor dolor sed.