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

Wrong layout around break of page #2044

Open
ildarworld opened this issue Jan 19, 2024 · 2 comments
Open

Wrong layout around break of page #2044

ildarworld opened this issue Jan 19, 2024 · 2 comments
Labels
bug Existing features not working as expected

Comments

@ildarworld
Copy link

Hello there,

im seeing issue when printing page with table layout around page break.
All required data for reproducing is attached. (just need to place static data somewhere and change references in HTML file)

It is working fine in version 53.4 but any more higher version has same behaviour.

image

data.zip

@liZe liZe added CSS Questions about how to do something with CSS bug Existing features not working as expected and removed CSS Questions about how to do something with CSS labels Jan 27, 2024
@liZe
Copy link
Member

liZe commented Jan 27, 2024

Hi!

Thanks for the report.

There are actually 2 different problems.

First problem

Bottom images don’t appear at the bottom of the first page because we fixed #36. Your "item"s reach the bottom of the page (before rotation, that doesn’t affect the layout), so they are displayed on the next page. As they are absolutely positioned, they overlap the first row of the next page.

It’s easier to understand what happens when removing the rotation and overflow: hidden on td:

Capture d’écran du 2024-01-27 10-30-51

The bottom images (EAC and other logos) are below the page bottom, so they’re displayed on the next page.

You can "fix" this problem with something like

.bottom-images {
  margin-top: -20mm;
  transform: translateY(20mm);
}

You’ll then get the images back at the bottom of the first page.

Second problem

Items are displayed twice at the top of the second page. There’s probably a bug in WeasyPrint causing this problem, we have to investigate.

It may be caused by td’s overflow: hidden. Removing it seems to fix the problem (you can try to use it as a workaround until the bug is fixed.)

@ildarworld
Copy link
Author

Thanks a lot @liZe 🙂 will have a look )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants