Landscape print layout is missing in Chrome, Edge
Written By
Gábor Komáromi
How To articles are not official guidelines or officially
supporteddocumentation. They are community-contributed content and may
not alwaysreflect the latest updates to Liferay DXP. We welcome your
feedback toimprove How to articles!
While we make every effort to ensure this Knowledge Base is accurate,
itmay not always reflect the most recent updates or official
guidelines.We appreciate your understanding and encourage you to reach
out with anyfeedback or concerns.
Legacy Article
You are viewing an article from our legacy
"FastTrack"publication program, made available for
informational purposes. Articlesin this program were published without a
requirement for independentediting or verification and are provided
"as is" withoutguarantee.
Before using any information from this article, independently verify
itssuitability for your situation and project.
Issue
- Selection of landscape layout is not available in Chrome/Edge printing (CTRL+P) as only portrait mode is available.
Environment
- Liferay DXP 7.0+
- Google Chrome or Microsoft Edge
Resolution
- The issue is only present on Chrome and Edge as the size descriptor of the @page at-rule is responsible for this behavior. It is set to
@page {size: a3; }
by default.
-
It is not compatible with Firefox and IE, so it is ignored.
-
Line :
@page {size: auto; }
can be inserted in the portal's Configure Page → Look and Feel and 'Insert custom CSS that is loaded after the theme.' field, and it will solve the issue by overwriting the default value.
-
This can be overwritten also in a custom theme's _custom.scss file by adding
@page {size: auto; }
line.
Did this article resolve your issue ?