Question
Vistronix
US
Last activity: 4 Oct 2018 13:54 EDT
Browser print function only displays partial header and Live UI overlayed. How can users print the entire screen?
When a user selects print or print preview from the browser, the only things that shows is a partial view of the header and the Live UI section is partially displayed on top. Everything else is gray, besides the Live UI icon showing in the bottom left corner. Can anyone suggest a way to display the entire screen just using the browser's print function?
The harness is using a header screen layout, with no visibility conditions on the embedded sections, only using dynamic layouts for display, using Pega 7.1.9.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Vistronix
US
Adding some CSS in our override file has taken care of this issue. Adding a media print CSS class, and setting both the header and main region to relative, while hiding the header, seems to have done the trick.
Hi Andrew,
Found a related Support Article on the PDN. Please let us know if it helps.
Regards,
Lochan
Vistronix
US
Hi Lochana,
I did see this article, and tried implementing this CSS in our application CSS override file, but it did not have any affect when printing.
Thanks,
Andrew
Pegasystems Inc.
IN
Hi Andrew,
Could you please provide us below details:
- Did you upgrade your PRPC version recently?
- Does the reported behavior occurs only for fixed portals?
- Open the js rule "pzpega_ui_doc_lifecycle" and search for .InterceptPrint. Do a private edit and write pega.u.d object instead of pega.u.d.interceptPrint and check the behavior of the print option.
Regards,
Sonal Sharma
Vistronix
US
Hi Sonal,
Thanks for your response.
1) We did not recently upgrade our PRPC version, but are using 7.1.9.
2) When I use a screen layout of any kind, the same issue occurs, regardless of having updated the skin rule for a specific layout or not. When I place just a container in the harness, the screen seems to print fine.
3) This change did not seem to have any affect on printing the screen layout setup.
Regards,
Andrew
Pegasystems Inc.
IN
Hi Andrew,
Hope you are doing good!!
Browser print preview cannot render Pega harness as some of them contain actionable elements and the html generated is dynamic.
OOTB perform harness has a Print icon. We recommend to use the OOTB print functionality which generates a HTML for preview and shows the content. You could use it in the right panel of the perform harness.
If the requirement at your end is to use browser print preview, then we recommend to place the harness in the container.
Regards,
Sonal
Vistronix
US
Hi Sonal,
Thank you for your response. I wish there was another way.
Regards,
Andrew
Pegasystems Inc.
IN
Hello Andrew,
I am afraid browser print option won't be feasible for this use-case. However, you may opt for one of the below options to achieve your requirement.
Option 1. Use the print button present on standard Perform harness.
Option 2. Add a button on the concerned screen and configure it with below action set.
On Click-Print
Option 3. Add a button on the concerned screen and configure it with below action set.
On Click-Run script:- "window.print"
Please note that using the 2nd approach won't provide you the privilege of Print Preview.
Please let me know, if you need any further clarification on above.
Vistronix
US
Hi Ajit,
Sorry for the delay. Thanks for your response. This isn't what I was hoping to hear, but it looks like I don't have any other options. Will see how the client reacts to this.
Regards,
Andrew
Updated: 19 May 2016 17:27 EDT
Vistronix
US
Hey Ajit,
After trying these approaches, I am still running into the same issue. This UI is in a data class displayed in the portal. #3 above acts the same as selecting the browser print, and #2 above loads a popup with an error. In the tracer, ActivityStatusExecptionHandler is called but no actual error is present.
Regarding Sonal's suggestion above, changing the screen layout to a container does allow the entire page to be printed, but it would require too much rework at this point in development.
Any suggestions?
Regards,
Andrew
Accepted Solution
Vistronix
US
Adding some CSS in our override file has taken care of this issue. Adding a media print CSS class, and setting both the header and main region to relative, while hiding the header, seems to have done the trick.
SG
what is the override file you have updated?
Pegasystems Inc.
IN
Hi,
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread.