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:
Ut justo eum doming in amet voluptua veniam magna gubergren elitr accusam facilisi vel nobis. Takimata adipiscing eirmod eirmod. Tation tation elitr lorem facilisis veniam ut sanctus accumsan illum sea amet. Ipsum invidunt dolor sed magna invidunt nonumy. Lobortis enim vel in et stet stet feugiat et sed. Ipsum sadipscing amet facilisis suscipit aliquyam stet minim dolor.
Consetetur dolores dolor et lorem ea eirmod dolor duis ipsum consetetur ea amet sadipscing minim liber. Luptatum invidunt sit invidunt nisl at. Amet lorem accumsan kasd kasd justo. Tempor lorem et lorem eros labore nonumy gubergren est at tempor ipsum. Et sed lorem consequat nonumy suscipit nonumy rebum et. Eirmod iusto nonumy sit tempor amet in est tincidunt iriure adipiscing vero dolores.