Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample report not produced correctly #851

daghemo opened this issue Apr 15, 2019 · 3 comments


4 participants
Copy link

commented Apr 15, 2019

When trying to reproduce the the sample report from samples/report I see something weird on the page break just after the cover:


I'm running on a CentOS 7.x using:

pip3 install WeasyPrint
git clone -b gh-pages --single-branch
weasyprint WeasyPrint/samples/report/report.html /var/www/html/report.pdf


This comment has been minimized.

Copy link

commented Apr 20, 2019

Same here, on LinuxMint 19.1, python 3.7.3, with weasyprint 47 and 46, but it does render correctly on 45. Possibly a regression? Or maybe the sample was relying on some wrong implementation?

Workaround, downgrade: pip install weasyprint==45


This comment has been minimized.

Copy link

commented Apr 25, 2019

I can reproduce the problem.
The expected PDF can be found at
It can be fixed by changing html body article#cover address { padding: 1cm 0; } to 0 1cm; but I don't know the expected result from this, if it's something that was fixed like @betafcc said or something that's wrong.

Edit: Ubuntu 18.04 Python 3.6.7 WeasyPrint==47


This comment has been minimized.

Copy link

commented May 15, 2019

Thank you for reporting this issue.

It's a float rounding error, I can fix it quite easily.

@liZe liZe closed this in 75cf2b6 May 15, 2019

@liZe liZe added this to the 48 milestone May 15, 2019

liZe added a commit that referenced this issue May 15, 2019

Don't change position of block children to avoid rounded float error
To fix #860 and #851, we decided to move block children a little bit to keep
them in the page. It's a bad idea, because children position is altered (and it
breaks many tests, by the way).

Increasing the allowed max_position_y is a better workaround as it doesn't
move blocks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.