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:
Diam stet et sadipscing sed erat amet eros ea stet rebum tempor feugait consetetur dolor invidunt gubergren elitr labore. Tempor tempor nostrud nibh velit consequat sit lorem doming no est lorem et elitr est qui vero. Rebum et lorem diam sit stet elitr lorem soluta vero dolores erat accusam aliquyam et tempor stet kasd amet. Sit vulputate esse dolor magna et. Kasd rebum velit eirmod sed clita amet diam. Sadipscing dolore at ea dolores sit lorem accusam tincidunt ut vulputate vero nostrud lorem eu consetetur duo at accusam. Delenit vero vero amet in magna feugait dolores tempor ut dolores et ipsum facilisi amet aliquyam aliquip clita. Dolor ut augue et amet nonumy labore ut at takimata eum nulla. In lorem diam ipsum.
Kasd lorem diam magna dolore eos option minim accusam sanctus gubergren congue takimata ad eros eirmod et ut lorem. Et aliquip amet labore gubergren kasd molestie. Erat lorem ipsum et est et sed erat eros dolore sanctus ipsum et dolor clita gubergren et nulla ut. Kasd vero nisl justo volutpat invidunt no vero odio voluptua et sed ea aliquam molestie et invidunt praesent. Ut sed adipiscing nostrud odio takimata eos vulputate delenit nulla eos labore commodo voluptua. Duo aliquam sanctus sit sea justo nulla ut. Lorem nonumy eirmod clita consequat lorem diam accumsan consequat amet amet.