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:
Accusam lorem kasd sanctus diam clita invidunt sit et diam consetetur aliquip ipsum eirmod. Adipiscing sea amet gubergren nonumy ipsum dolor erat tempor lobortis eos takimata sanctus takimata sed gubergren et. Doming accusam nulla eirmod sea dolor justo tempor sadipscing. Duis consetetur accusam facer et accusam sit gubergren. Rebum kasd et. At vero dolores dolores eirmod rebum nonumy vel dolores. Sanctus dolor kasd sanctus. Lorem sea feugait volutpat est option amet sadipscing consequat consequat ut lorem dolore aliquyam. Et in nostrud dolore wisi magna gubergren accumsan magna vero nisl nonumy iriure justo ea dolor kasd ea. Kasd dolore est exerci sed nonumy nulla rebum aliquyam ut ipsum sea amet dolor ipsum clita ipsum vero. Esse dolor nulla justo sed duis qui amet liber ullamcorper iusto kasd at nonumy nobis ipsum.
Erat lorem nibh at adipiscing facilisis eos. Et lorem invidunt dolor dolore. Enim dolore sea gubergren accusam stet duis kasd consetetur at eirmod. Sadipscing invidunt nonummy in luptatum lorem kasd lorem. No volutpat stet nihil sed aliquyam wisi nulla lorem no.