CourtBouillon / weasyprint-samples

Samples for WeasyPrint
https://weasyprint.org
265 stars 96 forks source link

Fix weasyprint 54.1 report issue #2

Closed FrancoisCapon closed 2 years ago

FrancoisCapon commented 2 years ago

Hi,

I'm building a weasyprint docker image based on Debian 11 and testing the report example:

weasyprint-report-01

I'm looking the cause of the difference and I find that is a calculation precision issue, with height: 290mm there no issue.

#cover {
  align-content: space-between;
  display: flex;
  flex-wrap: wrap;
  height: 297mm;
  height: 290mm;
}

So, I propose to change the code a bit to avoid using the height of the page to set the positions of the two <address>.

Below the two reports PDF:

liZe commented 2 years ago

Thanks for the pull request. We’d like to find why the rendering changed, and if possible find a solution that wouldn’t change the HTML document.

liZe commented 2 years ago

The bug has been fixed in https://github.com/Kozea/WeasyPrint/commit/fe3e3b992fe6205cf82c86803e9e1aafcb7aafd3, and will be included in WeasyPrint 54.2, thanks for the report!