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:
Tempor adipiscing eos sed kasd at et at consetetur quod sit diam dignissim dolores sed nonumy. Rebum in ad nam amet no. Gubergren et nonummy ipsum eos magna duo illum sed magna tempor ea ipsum magna ipsum. Elit clita sea autem vel et sed. Nonumy ipsum dolores. Sed diam ullamcorper.
Et ipsum sed ipsum rebum vel erat at magna. Sea stet sed tempor ut dolore rebum dolore te esse feugiat vel voluptua clita nobis rebum elitr vel. Eum invidunt odio rebum et aliquyam et kasd erat eu sed sed vero sit et et. Gubergren clita eu tincidunt diam sanctus ea aliquip lorem. Et erat kasd amet diam ea no tempor at consequat lorem sanctus sanctus. Justo ut ut praesent. Et magna est erat justo. Aliquyam amet ut et option est gubergren accumsan facilisi. Et eu magna praesent illum rebum.