Download/Print email to PDF

Dennis2
Kilo Expert

Hi everyone,

I'm trying to create a UI Action to download/print emails as PDF. I have followed this suggestion but for emails is not usefull (html is not translated):

find_real_file.png

Thoughts?

Thanks in advance.

Dennis.

1 ACCEPTED SOLUTION

Aman Kumar S
Kilo Patron

Hey,

You can create the UI action on the table and fetch html body and details.

One thing, you can't auto-download the file, but it will be added as attachment, I had done this for work notes.

Below code you can use:

var html = '<p>' + current.work_notes.getJournalEntry(-1) + '</p>';// you can fetch html body to pass on to the pdf

var result = new sn_pdfgeneratorutils.PDFGenerationAPI().convertToPDF(html,'incident', current.getUniqueValue(), 'My First PDF');//body of pdf, table where you want to add the pdf, sys_id of the record where you want to add the generated pdf, name of file
;
action.setRedirect(current);

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

View solution in original post

7 REPLIES 7

Hi Aman,

Thanks a lot, it works! The only thing to have the perfect functionality is to have signature images in the PDF also.

Do you know how I can do that?

Thanks again.

Dennis.

Community Alums
Not applicable

Hi Dennis,

For that you will have to integrate with a third party tool with the likes of Docusign or Adobe sign which can help you.

Mark my answer correct & Helpful, if Applicable.

Thanks,
Sandeep

Hey Dennis,

Hope my response answered your original query and for signature part.

Found article which you can follow:

Add an image (signature) in a PDF using Quebec API "PDFGenerationAPI"

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar