Question6Replies659ViewsX sandeep.kar07 Member since 2014 6 posts Cognizant Technology Solutions Private Limited Posted: 5 months agoLast activity: 3 months ago Solved Convert Base64 Stream to PDFHi All,I have a requirement where i need to convert jpg, jpeg and tiff files to pdf format. I have the Base64 encoded stream of the files in clipboard. How do i need to convert this into PDF file ?I have tried using this code in a Java Step before calling Code-Pega-PDF.View Activity. String s = tools.getParamValue("Markup").toString(); //markup is the base64 encoded stringbyte byteArray = new com.pega.pegarules.pub.util.Base64Util().decodeToByteArray(s);tools.putParamValue("PDFDocument",byteArray);I am able to download the PDF file post these steps but I am unable to open the PDF file. Its saying that its damaged (file is not correctly decoded)Please let me know way to convert Base64 Stream into PDF file.***Moderator Edit-Vidyaranjan: Updated Platform Capability*** Reporting ReplyI also have this Question (0) FacebookTwitterLinkedinEmail Copy Link Copied! Posted: 5 months agokanap2 PEGA replied to sandeep.kar07Please find the below URL to see if this solves the issue.https://collaborate.pega.com/question/base64-pdf Posted: 5 months agosandeep.kar07 Cognizant Technology Solutions Private Limited replied to kanap2I have tried the steps mentioned in the link. But post that, i am unable to open the PDF. It is saying that PDF is damaged (file is not correctly decoded) Posted: 5 months agoPraneethPurighalla PEGA replied to sandeep.kar07If possible, can you share the base64 string as a text attachment here? Posted: 5 months agoponnl PEGA replied to sandeep.kar07Hi,Create a section rule with following lines. add your base64 string to some property that you will refer in section rule as mentioned above. Use HTMLToPDF activity to convert this section rule into a pdf. Posted: 4 months agoDanielG1443 Proximity Software replied to sandeep.kar07Hello, I am working on something similar as well, currently I am able to just decode Base64 text to text but I need to decode Base64 to image, have you found a solution that can be shared? Accepted Solution Posted: 3 months agoUpdated: 3 months agosandeep.kar07 Cognizant Technology Solutions Private Limited replied to sandeep.kar07Hi All, I have solved this issue. I am able to convert Base64 Data to PDF file and also attach it to the work object.Please find the detailed steps in the attached file.