Question
PDF download not working
Hi,
We are trying to download pdf files using Code-Pega-PDF.View activity (OOTB), but it's not working when it's called from a modal outside case (without errors on trace or log files).
This activity has only one step with this script:
//Get the byte array from the parameter page
byte[] byteArray=(byte[])tools.getParameterPage().getParameterValue("PDFDocument");
//Get the pdf name from the parameter page
String pdfName=tools.getParamValue("PDFName");
//Send the PDF File back to the user.
String result=tools.sendFile(byteArray,pdfName,false,null,true);
Both parameters are correct and filled when running this step. Before open modal, we open a work object using Obj-Open-By-Handle by .pzInstKey and OpenPortal/$WorkProcessing thread is created. Does anyone used this activity in similar situation or know any solution about this issue?
Any help would be highly appreciated.
Thanks,
Yuri Silva
Hi Yuri,
Please refer to the below link which might be useful and let us know:
https://community1.pega.com/community/product-support/question/code-pega-pdfview-doesnt-work-button
Thanks,
Ankit