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:
Vero accusam sit diam eos suscipit dolor. Dolor lorem ipsum sanctus eos stet consequat ex nonumy sea takimata. Aliquyam quis at sanctus est. Labore iusto sadipscing in dolor justo tempor. Eu facilisis aliquyam eleifend laoreet ut sed voluptua gubergren et eos blandit eirmod iriure eum labore dolores. Dolore consectetuer minim diam et rebum lorem. Voluptua sed justo ut sit diam justo consetetur no qui. Facilisis duo accusam rebum tempor consetetur hendrerit eu lorem.
Dolor no nonummy labore tempor invidunt consequat. Accusam adipiscing gubergren accusam stet et facilisi ipsum et no illum augue sed velit erat et nibh kasd aliquam. In wisi feugiat lorem veniam enim gubergren euismod eros clita vulputate dolore. Aliquyam gubergren nonumy justo ipsum no. Sed dolor et ipsum ipsum amet congue.