Question

How to convert email .msg format to pdf in pega

HI

We have a requirement where the user attached an attachment which is .msg format , I mean he is trying to attach an email to the case

Now we need to convert to pdf to store in some application

Is there any OOTB or please give us some steps to get this functionality done.

***Edited by Moderator: Lochan to update platform capability tags***

Correct Answer
November 10, 2019 - 2:31am

Hi Charishmak,

Thanks for posting the query.

Step 10 of ConvertAttachmentToPDF activity contains a java code.It verifies for".doc" file and then converts it to pdf. You may have to modify this step for .msg.
Please find the screenshot attached.

Comments

Keep up to date on this post and subscribe to comments

November 6, 2019 - 8:14am

In a first place, it's quite weird requirement - the process to save email as msg is almost the same as save it as pdf (to pdf even easier I reckon).

But if you still cannot question this requirement, there's no OOTB pega features, but you can use a 3d party java library and use it to generate PDF file (like http://www.zeonpad.com/app/zeonpad-pdf-api.html)

November 6, 2019 - 8:37am
Response to vaspoz

Initially we are saving attachment in our DB but now we have a change where we store our data in some other system which accepts only pdf.

In our project we have given an ability to the user to add emails as an attachment to the case; so we need to convert such emails which are attached to pdf before sending to the new system

November 6, 2019 - 9:03am
Response to charishmak

so the question here is about the migration of existing emails?

November 7, 2019 - 2:06am
Response to vaspoz

yes, we need to migrate existing emails in to other system by converting them to pdf

November 7, 2019 - 4:05am
Response to charishmak

Then the solution will depend on the amount of emails in the system and on your team skills.

I'd follow this way:

1. From release day 1, prohibit for users to save attachments in msg format. Only pdf

2. Either

-- extract all msg attachments from Pega DB, create a separate small java app to convert these msg's to pdf's in a bulk

-- add coverting library to Pega, create a custom activity which will iterate through all workobjects (with msg attachments) and in a java step convert it to pdf

November 7, 2019 - 4:20am
Response to vaspoz

I want that conversion from msg to pdf

November 7, 2019 - 5:47am
Response to charishmak

how good are you in Java?

Pega
November 10, 2019 - 2:31am

Hi Charishmak,

Thanks for posting the query.

Step 10 of ConvertAttachmentToPDF activity contains a java code.It verifies for".doc" file and then converts it to pdf. You may have to modify this step for .msg.
Please find the screenshot attached.

Pega
November 10, 2019 - 11:14pm

Hello,

Please refer the below article, it might help.

https://community1.pega.com/community/pega-support/question/conversion-pdf-emails

Thanks

November 11, 2019 - 4:09am

@bhars1 and @palas3 mentioned the same solution.

Did you guys ever tried that? doc's are not the same as msg's under the hood