Ravi Kumar Pisupati (Ravi Kumar Pisupati)
Principal LSA - Pega
Ravi Kumar Pisupati Member since 2015 87 posts
Posted: February 22, 2018
Last activity: September 17, 2018
Posted: 22 Feb 2018 13:39 EST
Last activity: 17 Sep 2018 9:13 EDT

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***

Enterprise Application Development Dev/Designer Studio Data Integration Java and Activities User Experience
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.