Shweta Bhatia (ShwetaB2746)
Ernst & Young LLP

Ernst & Young LLP
ShwetaB2746 Member since 2020 18 posts
Ernst & Young LLP
Posted: November 20, 2020
Last activity: November 20, 2020
Posted: 20 Nov 2020 3:58 EST
Last activity: 20 Nov 2020 4:07 EST

Conversion from Word to PDF using Doxc4j in Pega 8.4.1

Hi Team,

Have referred the below pega community link to convert word document to PDF.

Have imported all the reference jars that are mentioned but still the code is breaking after the first line.

  try { doc = new"C:/PRPCPersonalEdition/temp/Sample.docx"));   tools.putParamValue("Check1","111"); org.docx4j.openpackaging.packages.WordprocessingMLPackage wordPackage = org.docx4j.openpackaging.packages.WordprocessingMLPackage.load(doc);   tools.putParamValue("Check5","555"); outDoc=new"C:/PRPCPersonalEdition/temp/test.pdf"));   tools.putParamValue("Check2","222"); org.docx4j.Docx4J.toPDF(wordPackage, outDoc);   tools.putParamValue("Check3","333"); } catch(Exception e){   tools.putParamValue("Check4","444"); } }

It is moving after first line to Catch block therefore Check1 and Check 4 are coming in Parameter page.

Any leads were are we going wrong.




Pega Platform 8.4.1 Case Management