Extra blank page when converting HTML to PDF using abcPDF

前端 未结 8 1158
花落未央
花落未央 2020-12-30 08:40

I have an HTML report, with each print page contained by a

. The page class is defined as

width: 180mm;
height: 250mm         


        
8条回答
  •  有刺的猬
    2020-12-30 09:28

    We had the same issue in production environment only but not in test environment. We only had page-brek-after used at multiple places in the html.

    Fix for first issue: I spotted the issue by removing the page-brek-after attributes one by one and this finally gave me the DIV section where page break was causing by some of it's element.

    I fixed the height of each elements inside the DIV and this finally fixed my issue without removing the page-break-after attribute.

    Fix for similar issue: If you have a custom hard coded footer, make sure to check by increasing/decresing it's height and margine.

提交回复
热议问题