Question

2
Replies
87
Views
Chintakayala Shiva Kumar (cshivas6)
CIBC

CIBC
CA
cshivas6 Member since 2013 12 posts
CIBC
Posted: October 25, 2020
Last activity: May 17, 2021
Posted: 25 Oct 2020 0:18 EDT
Last activity: 17 May 2021 5:39 EDT

Code-Pega-PDF.View activity code not working in PEGA 8

byte[] 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?

 

***Edited by Moderator: Pooja Gadige to add platform capability tag***
Pega Platform Low-Code App Development Senior System Architect