Question3Replies81ViewsX AntonyRajan Member since 2015 18 posts Hexaware Posted: 1 month agoLast activity: 1 month 1 week ago 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 Interface Consumer Services Lead System Architect ReplyI also have this Question (0) FacebookTwitterLinkedinEmail Copy Link Copied! Posted: 1 month agoUpdated: 1 month agotanie_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: 1 month agoSusanLiu 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: 1 month agoUpdated: 1 month agoYathender 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.