Convert Base 64 to PDF
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 string
byte[] 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.