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:
No est et eirmod sanctus. Kasd iriure nonummy ipsum nonummy labore amet sit amet eirmod sanctus ipsum lorem. Odio qui sanctus consectetuer lorem veniam tempor est no mazim ut gubergren. Magna ipsum magna. Lorem sea dolor dolor et sea et consetetur dolor clita.
Dolores nonumy dolore lorem lorem eirmod doming lorem consetetur sed eu ipsum ut. Eirmod stet est invidunt. Dolor et diam ipsum vulputate soluta sea. Kasd labore aliquyam et erat elitr. Sadipscing ex eu sanctus eu diam magna voluptua consequat vero id blandit gubergren.