Question
Air Force Office of Scientific Research
US
Last activity: 17 Feb 2021 10:12 EST
Inline PDF Document Preview (Pega 8.1)
Hi,
We are using Pega 8.1
I need to enable inline document preview on an attachment section that we built. However, when clicking on the attached documents, the only option available is to download it. Inline document preview is not available.
I tried adding a PDF to Pulse and the inline document preview works fine. I am very new to PEGA. I achieved my CSA in mid may.
Any suggestions is greatly appreciated.
Thank you.
***Edited by Moderator Marissa to update platform capability tags****
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Air Force Office of Scientific Research
US
Our lead developer figured out the solution.
To get the PDF inline attachment to work we needed to add the pyGetAllAttachments activity to the post load processing section of the data page sourcing the report to pull attachments by category.
Air Force Office of Scientific Research
US
The UI-Kit for both pyWorkAttachmentIcon and pyAttachmentFeedDescription is @ version UI-Kit-7:12:01:01
Pegasystems Inc.
IN
Hi,
Can you try using default pyCaseAttachmentsTopWrapper section for the adding attachments and see if it works for you.
Also check if your application is built on UI kit 12.
Thanks.
Air Force Office of Scientific Research
US
Hi @Sreepriya thank you for your suggestion, the Attachments tab is using the pyCaseAttachmentsTopWrapper section.
I noticed that when I add the PDF in Pulse, its displayed as a pzDisplayImageInline with the options to expand and download on the top right hand side.
This is the functionality I would like to enable for the pyCaseAttachmentsTopWrapper section.
Is there a way to get the expand and download buttons to show up in the attachments section similar to the mockup below ?
Hi @Sreepriya thank you for your suggestion, the Attachments tab is using the pyCaseAttachmentsTopWrapper section.
I noticed that when I add the PDF in Pulse, its displayed as a pzDisplayImageInline with the options to expand and download on the top right hand side.
This is the functionality I would like to enable for the pyCaseAttachmentsTopWrapper section.
Is there a way to get the expand and download buttons to show up in the attachments section similar to the mockup below ?
As of right now, the top right buttons doesn't exist and clicking on either the title or PDF icon will bring up the prompt to download the PDF.
I am looking at our application definition and I see multiple UIKit version (08.01 to 12.01). How can I tell which is the current version in use ?
Air Force Office of Scientific Research
US
I used the tracer tool to trace clicking on the PDF in Pulse and from the attachment tab. I noticed that in Pulse, the viewPDFInline parameter is set to true and it's working perfectly.
However in the attachments tab using the pyCaseAttachmentsTopWrapper section, the viewPDFInline parameter is set to False and it's prompting me to save/download the PDF instead.
Is there a way for me to set the viewPDFInline parameter to true when clicking on the PyWorkAttachmentIcon and Pyattachmentfeeddescription controls ?
Pegasystems Inc.
IN
Hi,
Parameter viewPDFInline is being set in the request URL by renderPDFAttachment function defined in pzpega_control_attachutil js file.
Here, it checks whether you are using any external viewer to see attachments, if not appends the parameter as true to request URL. I think here it is not sending the parameter.
You can place a debugger in this js file and see why useExternalViewer variable is getting true in your case for attachments, also compare it with pulse attachment to understand further.
Hope it points towards debugging it further.
Thanks.
Air Force Office of Scientific Research
US
Hi @Sreepriya
I've been going over the tracer logs for the upload process in the Attachments tab and Pulse and noticed that in Pulse, pyUseExternalViewer is set to False and this kickoff the inline preview feature.
Is there away to get pyUseExternalViewer to set to False during upload in the Attachments tab ?
Air Force Office of Scientific Research
US
Some progress today as I got help from a lead developer. We discovered that using pyAttachments of Class Link-Attachment the inline preview is working beautifully. However when the attachments are sourced by categories, the inline preview function seem to break and the file goes straight to download.
See image below. Any idea why this is breaking the inline preview ?
Accepted Solution
Air Force Office of Scientific Research
US
Our lead developer figured out the solution.
To get the PDF inline attachment to work we needed to add the pyGetAllAttachments activity to the post load processing section of the data page sourcing the report to pull attachments by category.
-
Shreeram Kumar