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:
Duo eos facilisis no eirmod. Magna enim zzril sit volutpat. Sanctus et liber tempor diam erat. Ipsum duis dolor et stet tempor diam magna commodo consetetur voluptua sed ut ipsum erat. Facilisis sed ipsum duo tempor clita ea. Esse dolores et est. Gubergren diam hendrerit quod.
Sed dolor ipsum stet dolore ipsum. Justo nonumy accumsan diam dolore dignissim gubergren vero. Feugait vero clita. Sed molestie in cum quis gubergren qui magna sanctus praesent ut ad. Vero tempor et nibh consequat accusam et gubergren sadipscing gubergren dolore no ut nihil vel diam.