[Ultimate PDF] Has anybody found a way to send their pdf as an email attachment

Forge Component
(7)
Published on 8 May by leonardo.fernandes
7 votes
Published on 8 May by leonardo.fernandes

Hey guys,


I have a page in my module that I can successfully download as a PDF through a button, I was wondering if there was a way that I could attach this to an email that I'm also generating in the module using the "attach file" action?

I'm not familiar with this Forge component but I do use HTMLToPDF. 

To be able to attach a generated PDF, I will write the binary of the PDF to an Entity and then get the entity record to attach it to the Email using the attach file action. 

Solution

Hi Alex.

You can use the PrintToPDF action to convert your screen into a PDF binary. After that, you can use the "attach file" as you were suggesting.

Solution

leonardo.fernandes wrote:

Hi Alex.

You can use the PrintToPDF action to convert your screen into a PDF binary. After that, you can use the "attach file" as you were suggesting.

This worked, thank you very much!