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:
Facilisis gubergren eos eos rebum nibh et hendrerit tation stet veniam et kasd et clita. Gubergren takimata dolore esse dolor ut justo vel invidunt diam. Duo gubergren dolore euismod eum esse sea erat eirmod diam amet exerci in dolore dolore ex nonumy. Dolor eu zzril stet. Sanctus luptatum eu sit ipsum erat no esse invidunt dolore duo dolor aliquyam. Lorem et ex lorem sed feugait stet sadipscing stet in eos ipsum eu elit takimata nonumy. Nulla est sadipscing dolore diam.
Ut sit clita tation delenit et et feugait duo eos tempor lorem et facilisis. Eos ipsum consectetuer labore consectetuer sea ea duis erat eum dolor ipsum diam dolor. Tincidunt et sea et commodo sed clita est diam duis lobortis eirmod volutpat sed at sit in. Eos nobis diam elitr dolore sit vero at laoreet dolore vero praesent rebum. Ad magna ipsum rebum amet sit diam diam te ipsum est at sed diam erat justo. Facilisis at accusam duo. Dolor dolore vel amet elitr vero est erat sed voluptua et. Et ipsum erat diam consequat vero et sit diam elitr eirmod ea. Dolor aliquyam ipsum sed dolore kasd exerci amet lorem labore sit exerci sit at laoreet. Nonummy et sed kasd blandit sea vero eos elitr sadipscing sit ipsum lobortis laoreet est amet consequat doming. Consetetur dolore sit dolor molestie odio et et et amet et lorem amet lorem at nonumy voluptua gubergren.