Question

2
Replies
1021
Views
yurispinto Member since 2018 4 posts
Tata Consultancy Services
Posted: 2 years ago
Last activity: 2 years 4 months ago
Closed
Solved

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

Low-Code App Development Data Integration Java and Activities User Interface
Moderation Team has archived post
Share this page LinkedIn