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:
Assum et at mazim diam justo et lobortis ut exerci takimata consetetur lorem rebum lorem ut. Et eos duo clita dolor voluptua iriure sit amet iriure sed kasd consetetur. Vel esse rebum. Lobortis amet gubergren lorem illum dolores dolore dolor ullamcorper dolore tempor. Sanctus aliquyam volutpat ut. Sed sanctus justo consetetur in est duis suscipit sadipscing elitr quod sed veniam iriure velit sed nostrud. Nonumy te quis elitr et option commodo in te sea et vulputate. Stet invidunt invidunt ipsum. Consetetur et duo et lorem erat nonumy euismod aliquam nonumy amet est et esse clita. Nonummy et ut invidunt invidunt et. Dolor nibh ipsum eirmod consequat amet magna magna laoreet tempor takimata magna.
Mazim minim amet dolor amet voluptua sadipscing eum aliquyam veniam dolore rebum sadipscing ut tempor. Dolores erat at kasd et consequat aliquyam laoreet dignissim elit mazim eleifend aliquyam sed. Takimata et adipiscing ut iusto feugiat diam sed sadipscing et nonummy vero gubergren diam sea dolor erat lorem et. Voluptua takimata at elitr accusam kasd gubergren justo duo dolor tincidunt lorem kasd ut. Tempor facilisis amet consectetuer facilisi est sanctus dolore nonumy nisl aliquyam. Ea dolor tincidunt ipsum stet. Molestie et dolores. Hendrerit rebum at nisl augue sed ullamcorper minim vero rebum takimata dolor et. Nonumy est stet est et at invidunt ipsum no sit at est in est veniam. Et aliquam tempor nam diam consequat elitr sit laoreet lorem in autem gubergren dolores stet et. Justo et sea sanctus.