Posted: 22 Mar 2018 15:10 EDT Last activity: 15 Jun 2018 3:24 EDT
Create PDF results in blank PDF file
I'm using a Create PDF smart shape in Pega 7.3.0.
When I run the case within Designer Studio it works (the formatting needs a lot of work but the data is there). However, when I run the case in the "Case Default" portal, the PDF that gets generated is blank. How do I fix this problem?
***Updated by moderator: Lochan to add SR details***
The customization performed on the skin level were tweaked to resolve the issue. We are not privy to the details on the exact customization performed as that information is probably internal to @DIVAKARJEY12's environment.
Don't know if this is a case here but with that title it might help people. We tried to call generate PDF activity behind the flow utility from a button on the screen and we also got a blank pdf generated. We found out that it was because we called the activity in a refresh section, this in a way broke the html generation that is done before HTMLtoPDF activity. We used the action Run activity, then refrehs section and it worked, pdf was added to attachments.
As far as our scenario is concerned we used the OOTB create pdf smart shape in the flow. The pdf was getting generated by the styles were not proper and we would see a grey background with text hidden below it. We then create d a seperate harness and just referenced the section and created a new activity to pass the harness as parameter. Then it was able to display the pdf.
When it was worked by the case manager the pdf was ok but when it was generated as a case worker the pdf was blank. We traced it and saw that the markup text was also different for both users. Not sure why
Running PEGA 7.3.1, I came across the same behaviour this week and tried to narrow it down - only cases run by Admin or Manager resulted in a good PDF. Blank PDFs were actually smaller in size so I ruled out any layering as the content doesn't seem to be there.
After reading this post I tried to exclude any 'custom' factors. I created a simple one step application using the standard theme in Express/DesignerStudio. The app uses the OOTB create pdf smart shape and a single field for 'reporting'. The PDF contains a single section with a paragraph in a dynamic layout - nothing else.
Creating cases from Designer Studio with users Admin, Author resulted in a populated PDF.
Creating cases from Case Manager with users Admin, Manager resulted in a populated PDF.
Creating cases from Express with users Admin, Author resulted in a blank PDF.
Creating cases from Case Worker with users Admin, User, Author resulted in blank PDF.
For now my conclusion is that it works from Designer Studio or Case Manager regardless of user authorization or any other 'custom' parameter.
I recently faced this issue and below are the 2 feasable options. Please try.
Modified DATA-PORTAL pyCaseWorker section. Inside this, Dynamic Container is present. this container will load pyCWPortalContent harness.
Change this dynamic container properties. As of now, it is a single document mode dynamic container. Change it to multi document container(drag new dynamic container and do the same configuration and select multi document with 2 tabs.)
With this change, you will be able to see pdf document content. But, this will not work if you are not using latest version of chrome.
For the same Dynamic container layout properties (single document), Untick Render as single page option in Layout properties.
This will make the pdf content visible. But, on case worker portal, for every submit happened, it will refresh the whole portal instead of only work area.