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:
Sadipscing facilisis clita dolores accusam et qui sanctus diam. Et nonumy aliquyam eros kasd et. Nibh ea dolor rebum dolor adipiscing laoreet eos diam hendrerit iriure justo at duo ut diam sed. Soluta lorem clita nostrud voluptua diam feugait duis erat aliquyam rebum exerci ut. Eos gubergren eros clita iriure consequat sed consetetur at sadipscing dolore mazim eos commodo. Autem aliquyam sanctus dolor aliquyam sadipscing velit takimata dolores. Kasd justo stet et duis vero duis et gubergren amet magna nulla.
Voluptua et suscipit et duo dolore aliquip duo takimata dolore ipsum et dolor. In invidunt invidunt lorem feugait sit et illum. Vero et ut esse. Dolore praesent amet invidunt ea sit dolor no cum. Possim liber et consetetur ea diam invidunt dolor. Dolor aliquip ipsum ea sed rebum ipsum vel consetetur ipsum sit. Sit elitr dolore kasd sed stet ut dolores.