Question Blazor Server Application window.print page orientation problem

raysefo

Well-known member
Joined
Feb 22, 2019
Messages
361
Programming Experience
10+
Hi there,

Depending on a business rule I need to print one dialog/modal landscape orientation. When I click on print on the Firefox page, the page layout option appears on the print preview page.
FF - Stackoverflow.png


But interestingly when I try to print the Blazor dialog/modal page, the layout option does not appear.
FF - Blazor Server App.png


Here is my print CSS:
CSS:
     @media print {
         body * {
             visibility: hidden;
         }
         #printarea, #printarea * {
             visibility: visible;
         }
         #printarea {
             position: absolute;
             left: 0;
             top: 0;       
         }
            
     }

In CSS, I added landscape property but unfortunately didn't work.
 
I'm not a CSS expert, but my guess would be to check to see if any of your CSS has been overriden when the dialog is displayed.
 

Latest posts

Back
Top Bottom