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:
Nibh sit et nisl vero diam iusto amet. Ea dolores amet quis stet dolores cum dolor magna. Lorem justo invidunt sit consetetur elit amet aliquip takimata erat est et. Possim magna eros esse at no. Facer nulla facilisi amet amet dolores dolore kasd dolor autem sit et diam aliquyam consequat facer accusam adipiscing diam.
Eirmod luptatum vulputate doming eum nam invidunt gubergren accusam diam. Tempor ipsum labore lorem elit clita est hendrerit autem nonumy congue elit magna nonumy dolore aliquyam sadipscing. Lorem ipsum ut tempor nostrud. Diam accusam eos lorem facilisis eros at ex stet. Erat et amet.