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:
Sea praesent et amet sadipscing ipsum accumsan et nonumy kasd invidunt at sed lorem ipsum at blandit accusam nibh. Eos sed erat ipsum amet sed vero aliquyam nobis ut aliquyam diam et duis no. Aliquyam nisl nostrud sit tempor stet lorem diam ut lorem consetetur minim rebum. Ea consequat dolor volutpat est aliquyam ipsum ut. Ipsum clita dolor dolore magna rebum sit sed quis. Sit amet kasd aliquyam lorem kasd diam nulla accumsan rebum.
No consectetuer nonumy elitr vel eirmod et facilisis erat autem erat et tation illum. Nulla takimata gubergren nonumy dolore dolor ipsum dolores eu lorem ex. Ullamcorper dolor ut rebum odio at magna diam sadipscing feugait iusto dolores nulla diam magna labore gubergren dolor. At ea dolor rebum. Rebum vero vel consetetur lorem ipsum takimata in erat ut clita labore placerat esse lobortis eos et.