Close popover
Ravi Kumar Pisupati (Ravi Kumar Pisupati)
Principal LSA - Pega
Ravi Kumar Pisupati Member since 2015 83 posts
Posted: February 22, 2018
Last activity: September 17, 2018

Unable to open/download the PDF file by clicking the button again and again


We have a requirement to show the PDF by making a Conn-REST call to DocuSign and bring the PDF data from the response. After getting the response, we need to prepare the PDF and allow the user to open/download it from a button click. Here are the steps followed.

1) UI -> Section -> Button -> onClick -> Refresh-This-Section -> Call GetPDF activity

2) From the above activity, we have a call to Connect-REST and capture the PDF bytes stream from DocuSign response into a Parameter. After getting the Parameter value, we call the below java code from the same activity and the Page-Remove step.


String FileBinaryContent= tools.getParamValue("PDFData");
String FileName=tools.getParamValue("PDFFileName")+".pdf";
byte[] sPDFDecoded = org.apache.commons.codec.binary.Base64.decodeBase64(FileBinaryContent.getBytes());
String result=tools.sendFile(sPDFDecoded,FileName,false,null,true);


Code is working fine when we click the button from the Review harness and PDF is opening for download. But the problem is like, if I click the same button again and again then I don't see the PDF gets generated though I see a flickering after button click. By the way we are using PRPC V7.2.2

Please suggest me a solution to resolve this issue.


Ravi Kumar

***Edited by Moderator Marissa to update platform capability tags***

Low-Code App Development Dev/Designer Studio Data Integration Java and Activities User Experience
Moderation Team has archived post