Converting doc & docx to PDF in Pega 7.3
Hello dear community,
I have some troubles to convert Word files recieived from attachements to PDF. The context is such as, I am using Pega CRM 7.3 and I need to convert my doc/docx to sring Base64 but in such way that it is converted as PDF.
After looking a bit, I found the activity "ConvertAttachmentToPDF", which is supposed to convert doc (and not docx). I tested this activity with only .doc document first of all, but it failed. After few researches, I found this : https://community.pega.com/support/support-articles/unable-create-pdf-files-doc-files-0, explaining
that "[...] ConvertAttachmentToPDF flow action uses ActiveX integration and works only in Internet Explorer browser. Pega 7.3 and later versions do not support ActiveX controls[...]". I am using Chrome and Firefox, iIcan't be restricted to a single browser tho.
In the end, no solution is provided, only a link for some information about ActiveX, which doesn't work : https://pdn.pega.com/deprecation-microsoft-activex-controls-pega-platform/deprecation-microsoft-activex-controls-pega.
Do you have any ideas on how I can successfully make this conversion ?
Thank you.
Best regards,
Kévin.
***Edited by Moderator Marissa to change from Discussion to Question***


Hi Kévin,
How accurate does the PDF have to be? I mean: could you extract the text and the basic structure of the WORD file (using 'doc4jx' maybe) and then create a PDF using (say) PDFBox - both libraries ship with the Pega Platform.
So the PDF would be a representation of the original WORD file - rather than being a 'screenshot' of the actual WORD file itself - depends on your use-case as to whether that would be acceptable as a 'preview' or not I guess.
Can you use a Print Driver ("Print to PDF") here? That would output the WINWORD file as a PDF - but you would (probably) need to hook out to a Windows Environment to do this.
Or - is there a Web Service which could perform the service for you?
John