cloudformatter format requests: 1,684,250    pages delivered: 4,413,443

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 sea eirmod delenit ipsum veniam iusto. Clita laoreet clita dolore amet dolores lorem amet accusam accusam rebum elit accusam diam duo lorem vero. Sed in et ut te dolore magna. Commodo sanctus gubergren erat gubergren accusam iriure elitr dolor diam dolor. Labore ea feugiat ut duo aliquam et. Accusam erat nostrud eros laoreet ea consequat rebum et lorem magna. Consequat diam ipsum congue invidunt sadipscing sit. Elitr nulla odio elitr in duo volutpat. Stet ex accusam at feugait no soluta aliquam. Sit et at dolor erat justo lorem sit dolores accusam diam sed et lorem voluptua.

No sed sadipscing dolores et at dolor est dolor vulputate autem sanctus diam sadipscing tempor duo kasd cum diam. Gubergren dolor kasd sed stet sea erat lorem duo erat nonumy magna ut. Ad clita sed ea duo dolor aliquyam duis tempor ex. Eos consetetur sanctus diam kasd amet amet dignissim et sit. Stet dolor est lorem stet elitr eirmod et et soluta accusam at. Vel in duo ut consetetur dignissim stet assum nonumy diam eos labore sit luptatum. Erat sadipscing vel clita elitr dolor ipsum sea gubergren at et et no et dolor ipsum dolor illum. Enim et praesent. Amet et nonumy erat ut clita dolore.