cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Email html/plain text to PDF

former_member183993
Participant
0 Kudos

hi experts:

I have seen many posts on topics of conversion to PDF however I do not believe those meet my requirements.

I am using CL_CRM_EMAIL_UTILITY=>SEND_EMAIL to send mail to contacts using contents in an SO10 standard text.  After sending email I use CL_CRM_EMAIL_UTILITY=>CREATE_ACTIVITY to create an interaction log.  In the log I put notes which consist of the contents of the email to the contact.  What our business users want is a PDF attachment of the email in the interaction log.  I have tried getting the XML->string->xstring->binary to generate a PDF but obviously this is not working.

What has anyone done in a similiar situation?  Recall, I am not using Smart Forms nor Spool.

Thanks for your help,

Chris

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Chris,

I have a similar problem ... I have to convert an inbound email to PDF.

Did you solve your problem and if yes can you please give me an advice how to do?

Thanks a lot!

Best regards,

Monika

former_member183993
Participant
0 Kudos

hi Monika,

I did resolve this and simply forgot to update the thread.

What I did was this...

I got the HTML or text email content.

I called cl_crm_email_utility=>create_activity to create the activity

Next, I called FM crm_ps_activity_attach_file where you specify the mimetype which you can choose html or PDF, etc. and in iv_content pass in your content.  This attaches the document to the activity.

Now, it seems you need to convert an inbound email specifically, to PDF and attach somewhere, is that true?  What format does this email come in as?  Is it binary, xstring, string, etc. or as the object itself?

Chris

Former Member
0 Kudos

Hi Chris,

yes, I have to convert an inbound mail to PDF and attach it to Purchase Order as GOS.

I get the email as xstring.

Monika