Question 3 Replies 348 Views × Close popover Antony Lawrence R (AntonyLawrence) HCL HCL IN View Profile Send Message AntonyLawrence Member since 2015 18 posts HCL Posted: February 26, 2020 Last activity: February 26, 2020 Posted: 26 Feb 2020 16:15 EST Last activity: 26 Feb 2020 23:08 EST Closed Open PDF in new Window Hi 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 popover Facebook Twitter Linkedin Email Copy Link Copied! Moderation Team has archived post, learn more × Close popover 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. Posted: 1 year ago Updated: 1 year ago Posted: 26 Feb 2020 15:24 EST Updated: 26 Feb 2020 16:15 EST × Close popover Elisha Tanikonda (tanie_GCS) PEGA GCS Principal Software Engineer Pegasystems Inc. US View Profile Send Message tanie_GCS PEGA replied to AntonyLawrence Hi Have 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 year ago Posted: 26 Feb 2020 19:08 EST × Close popover Susan Liu (SusanLiu_GCS) PEGA Principal Software Solutions Engineer Pegasystems Inc. US View Profile Send Message SusanLiu_GCS PEGA replied to AntonyLawrence You 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 year ago Updated: 1 year ago Posted: 26 Feb 2020 23:06 EST Updated: 26 Feb 2020 23:08 EST × Close popover Yathender Jalla (Yathender) PEGA UI Architect Pegasystems Inc. IN View Profile Send Message Yathender PEGA replied to AntonyLawrence Hi This is a duplicate to https://collaborate.pega.com/comment/717606 on 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 it Step 1: Java String 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.View PDFName : Example.pdf PDFDocument : Param.Data Hope this helps.