Question3Replies233Views×Close popoverAntony Lawrence R (AntonyRajan) Hexaware Hexaware IN View Profile AntonyRajan Member since 2015 18 posts Hexaware Posted: February 26, 2020Last activity: February 26, 2020Posted: 26 Feb 2020 16:15 ESTLast activity: 26 Feb 2020 23:08 EST Open PDF in new WindowHi All,Below is my requirement:1. On click of a link , i will pass some parameter to rest service.2. Rest will return PDF in 64 bit encoded format stream (background)3. On click of link need to open a new window to show this PDF stream decoded. (should not attach PDF to Work object) . Just PDF viewer and we can save the PDF if necessary in local. How to achieve this? Any OOTB rules available ? Need solution for this urgently. Thanks in advance. Regards,Anto ***Edited by Moderator Marissa to update Content Type from Discussion to Question; General to Product; *** Pega Platform 8.1.4 User Experience Consumer Services Lead System Architect ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Posted: 10 months agoUpdated: 10 months agoPosted: 26 Feb 2020 15:24 ESTUpdated: 26 Feb 2020 16:15 EST×Close popoverElisha Tanikonda (tanie_GCS) PEGA GCS Principal Software Engineer Pegasystems Inc. US View Profiletanie_GCS PEGA replied to AntonyRajanHiHave you reviewed the OOTB activity rules ViewExportToPDF, pyViewAsPDF, ViewAsPDF?I am suspecting what you are asking is, similar to how we have 'Export to PDF' option on a Report Definition.Thanks Posted: 10 months agoPosted: 26 Feb 2020 19:08 EST×Close popoverSusan Liu (SusanLiu_GCS) PEGA Principal Software Solutions Engineer Pegasystems Inc. US View ProfileSusanLiu_GCS PEGA replied to AntonyRajanYou can use a "Open URL in new window" to render a PDF in a pop-up window. You may also use a Modal dialog to display the PDF instead. Posted: 10 months agoUpdated: 10 months agoPosted: 26 Feb 2020 23:06 ESTUpdated: 26 Feb 2020 23:08 EST×Close popoverYathender Jalla (Yathender) PEGA UI Architect Pegasystems Inc. IN View ProfileYathender PEGA replied to AntonyRajanHiThis is a duplicate to https://collaborate.pega.com/comment/717606on click of the link you can create and run an activity which takes string parameter Ex: Data (base 64 encoded)if you want to preview the data without downloading itStep 1: JavaString s = tools.getParamValue("Data").toString(); //Data is the base64 encoded string (Parameter) byte byteArray = new com.pega.pegarules.pub.util.Base64Util().decodeToByteArray(s); tools.putParamValue("Data",byteArray); tools.sendFile(byteArray, "Example.pdf",false, null, false);This will view pdf in a new window. if you want to download the file Step 1: Java String s = tools.getParamValue("Data").toString(); byte byteArray = new com.pega.pegarules.pub.util.Base64Util().decodeToByteArray(s); tools.putParamValue("Data",byteArray);Step 2: Call Code-Pega-PDF.ViewPDFName : Example.pdfPDFDocument : Param.Data Hope this helps.