Landscape mode not applied during print preview in Chrome (version 117)

190 Views Asked by At

After updating to Chrome version 117, the following CSS for landscape mode seems to have stopped working, and I can no longer see the A4 landscape print preview. The provided sample code correctly displays an A4 landscape preview in Edge, but in Chrome (version 117), it displays as A4 portrait.

<html>

<head>
    <title>Print Test</title>
    <style>
        @page {
            size: A4 landscape;
        }
    </style>
</head>

<body>
    <h1>Print Test</h1>
    <p>Print Test</p>
</body>

</html>

Has anyone else encountered this issue and is there a workaround or fix for it?

I tried the following versions:

  • chrome 117: Not working (NG)
  • chrome 116: Working (OK)
  • Edge 117: Working (OK)
1

There are 1 best solutions below

0
John On

This is not officially supported in the spec see Is @Page { size:landscape} obsolete?

For alternatives see Landscape printing from HTML