Email to PDF

Miriam Zaragoza
Tera Contributor

Hello, 

I have created a button in the workspace to download the emails associated with a case in PDF. I am using the following code for generated the PDF:

var html = mail.body.getHTMLValue();
var result = new sn_pdfgeneratorutils.PDFGenerationAPI().convertToPDF(html,cs.sys_class_name, cs.getUniqueValue(), mail.subject);

I have a PDF but with lot of errors.

1º) Special characters are not supported.

2º) It does not save the images associated with the email in the PDF.

Can you help me?

 

Thanks.

2 REPLIES 2

Jamsta1912
Tera Guru

Hi Miriam,

I have been playing around with this API today. I had the same issue with images but I found it works OK if you use the full URL for the image in your HTML (i.e. including your instance name).

Moumita
Tera Contributor

Hi @Miriam Zaragoza Pastor ,

I am trying to export email related to cases as pdf but unfortunately unable to view the UI action.

Please help me where you have created the UI action and let me know the steps you followed.

Thanks

Moumita