53
Views
3
Comments
Solved
[Ultimate PDF] Has anybody found a way to send their pdf as an email attachment
Question
Forge component by Leonardo Fernandes
15
Published on 08 Jan 2021

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?

mvp_badge
MVP
Rank: #5
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.

Rank: #8607

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!


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. 

mvp_badge
MVP
Rank: #5
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.

Rank: #8607

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!