You can hook into the email sending pipeline as outlined here https://vendr.net/docs/core/1.8.0/key-concepts/pipelines/ and create your own AttachPdfInvoiceTask task to read the current HTML for the email (which will be passed in a context argument) about to be sent, then use a PDF generation library to generate the PDF and add it to the emails attachement.
You'd then want to register the task just before the email get's sent
Is it on the roadmap to include support for PDF generation at some point in the future? We would like to implement a custom implementation for now, but would like to know if there will be native support in the future.
PDF invoice generation
Hi,
Is there a (simple) way to attach the invoice as a PDF to the email?
Regards, Sibren
Hi Sibren,
I guess it depends on your definition of simple 😁
You can hook into the email sending pipeline as outlined here https://vendr.net/docs/core/1.8.0/key-concepts/pipelines/ and create your own
AttachPdfInvoiceTask
task to read the current HTML for the email (which will be passed in a context argument) about to be sent, then use a PDF generation library to generate the PDF and add it to the emails attachement.You'd then want to register the task just before the email get's sent
Hope this helps
Matt
Hi Matt,
Thanks. I was hoping for even more simpler, but this'll do!
Regards.
Hi.
We have just done the exact same thing and it is working locally.
Our issue is that we use the rotativa.mini and that program is using an .exe file and we wont be allowed to use a .exe file on our webservers.
So my question is if you got it working using any free pdf converters or if you know of any?
Is it on the roadmap to include support for PDF generation at some point in the future? We would like to implement a custom implementation for now, but would like to know if there will be native support in the future.
@anh-duc-le it's not currently on our roadmap no, so you'll want to follow a similar custom approach
is working on a reply...