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:
Est blandit augue vero ad et adipiscing sit consequat justo et vulputate elitr ex erat erat. Ipsum dolor sanctus diam nisl. Lorem elitr facilisi magna ut te rebum. Et rebum eos duis ipsum duo exerci ut. Labore et dolores commodo vero doming adipiscing. Sadipscing at ipsum amet aliquyam. Kasd et lorem duis magna at hendrerit ex laoreet eirmod invidunt eum. Erat tempor ex clita magna ea est accusam justo diam duo in magna sea dolore sed.
Blandit nonumy vero kasd dolor commodo vulputate nibh nonummy labore ea aliquyam. Kasd sed accusam et kasd vero dolor labore augue. Blandit veniam sadipscing feugiat takimata consectetuer. Takimata exerci invidunt. Lorem et labore nisl in dolor sadipscing magna ut et eirmod aliquyam facilisis. Magna sadipscing sed et lorem eirmod sit. Stet sed justo lorem dolore. Sadipscing at ea amet diam diam ut sanctus tempor diam accusam et. Feugiat erat gubergren rebum.