Print problem in rain 4

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
kubek1976
Posts: 5
Joined: 12 Jan 2022, 14:03

03 Mar 2023, 11:52

Hi.
There is a problem in one of the files that affects printing across the layout. The ctrl+p shortcut prints the white page

Problem is in _invoice.scss :

Code: Select all

@media print {
    body * {
        visibility: hidden;
    }
Best regards.
Rafal

olgubasak
Posts: 98
Joined: 05 Jan 2023, 11:05

07 Mar 2023, 15:04

Hi,

Thank you for your notification. I will review it and get back to you.

ybendek
Posts: 102
Joined: 05 Aug 2011, 17:52

09 Mar 2023, 02:42

Hello

I have the same problem, even the p:printer component is failing and displaying an empty page

olgubasak
Posts: 98
Joined: 05 Jan 2023, 11:05

16 Mar 2023, 14:24

Hi again,

Depending on what you want to see on the pages, you can make changes to invoice.scss. As an example, you can examine the code I shared below.

invoice.scss:

Code: Select all

@media print {
     .invoice-body * {
        visibility: hidden;
    }
 }
invoice.xhtml

Code: Select all

<ui:define name="head">
        
        <script>
            $(function(){
                $(document.body).addClass('invoice-body');
                        
                
            });
        </script>
    </ui:define>

DelmerMaggio
Posts: 1
Joined: 29 Jan 2024, 08:24

29 Jan 2024, 08:28

I tried and it works. tunnel rushThanks.

ulnaoperating
Posts: 2
Joined: 12 Mar 2024, 12:43

12 Mar 2024, 12:45

Like you, I'm seeing an empty page when I try to print basketball stars using the p:printer component.

bubblyeducate
Posts: 1
Joined: 14 Mar 2024, 03:29

14 Mar 2024, 03:32

ybendek wrote:
09 Mar 2023, 02:42
Hello

I have the same problem, even the p:printer component is failing and displaying an empty page
I also get a blank page displayed, how do I fix it?

Post Reply

Return to “Rain - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests