Home > Software engineering >  After the new version of chrome(108), it adds an extra blank page when printing from my application.
After the new version of chrome(108), it adds an extra blank page when printing from my application.

Time:12-13

It works fine on Microsoft edge.

The following worked on one page. However, there is this error in the core of the project.

@@media print {
    html, body {
        height: 100vh;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        }

    }

While printing some pages, it does not add a blank page to the last page.

CodePudding user response:

I'm not sure but remove extra page-break-after for last elements in DOM may be resolve this problem. I change my css from this

    .page {
        page-break-after: always;
    }

to this:

    .page:not(:last-child) {
        page-break-after: always;
    }

CodePudding user response:

The same behavior is observed when trying to print a Google map.

  • Related