Question2Replies29Views cshivas6 Member since 2013 11 posts CIBC Posted: October 25, 2020Last activity: October 27, 2020 Code-Pega-PDF.View activity code not working in PEGA 8byte byteArray = Base64Util.decode(tools.getParamValue("PDFDocument").getBytes()); String pdfName=tools.getParamValue("PDFName"); String result=tools.sendFile(byteArray,pdfName,false,null,false);The above code used in PEGA 7 to display PDF in a browser and it's absolutely working fine, but not in PEGA 8.Any thoughts?There could be some changes done in sendFile method. Base64Util is deprecated in PEGA 8 due to some close stream issues.Could anyone suggest here? Pega Platform Senior System Architect ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Posted: 1 month agoMarcLasserre_GCS PEGA replied to cshivas6Hello, What do you mean exactly by "Not working". Any error message? Anything on your log files? Posted: 1 month agoduraisankar Serendebyte replied to cshivas6Hi cshivas6,In Pega 8, it seems like they tweaked a code a bit by replacing Base64Util with explicit type conversion.Try replacing line 1 of your code with below code.byte byteArray=(byte)tools.getParameterPage().getParameterValue("PDFDocument");I hope this helps you. Good Luck!