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

Overflow hidden not working when content is too large to fit in a page. #2026

Closed
pareshbalar opened this issue Dec 27, 2023 · 8 comments
Closed
Labels
bug Existing features not working as expected
Milestone

Comments

@pareshbalar
Copy link

pareshbalar commented Dec 27, 2023

Here is my simple HTML code (added in zip) where there are just two div containers with fixed 100px height and overflow hidden. [Update: correct HTML file added]
html.zip

When I am converting this HTML to PDF using Weasyprint, the first box seems to be fine but I am facing an issue with the second box.

Here is the Output PDF:
out.pdf

Here are the versions.
System: Windows
Machine: AMD64
Version: 10.0.19045
Release: 10

WeasyPrint version: 60.2
Python version: 3.12.1
Pydyf version: 0.8.0
Pango version: 15003

Please help.

@pareshbalar pareshbalar changed the title Overflow hidden not working when content is too large. Overflow hidden not working when content is too large to fit in a page. Dec 27, 2023
@liZe
Copy link
Member

liZe commented Dec 27, 2023

Hi!

Your input HTML doesn’t correspond to the PDF you provide, and there’s no overflow CSS property in it. Could you please provide the HTML file that gives your output PDF?

@pareshbalar
Copy link
Author

pareshbalar commented Dec 27, 2023

My mistake :(
Attached wrong html file.

Here is the correct HTML file.
html.zip

Here is the screenshot of CSS & HTML
image
image

Output Screenshot.

image

@liZe liZe added the bug Existing features not working as expected label Dec 27, 2023
@liZe liZe closed this as completed in bc97131 Dec 27, 2023
@liZe
Copy link
Member

liZe commented Dec 27, 2023

Thanks for the report! It’s fixed and tested, feedback is welcome!

@liZe liZe added this to the 61.0 milestone Dec 27, 2023
@pareshbalar
Copy link
Author

Hi @liZe Thanks for the quick reply.

I am using the Weasyprint 60.2 version which is the latest I think.

Is this fix released in this version or it's planned in an upcoming release (61.0)?

If it's not yet released, when can we expect it or is there a way I can use it now?

Thanks again! Really appreciate the quick answer.

@liZe
Copy link
Member

liZe commented Dec 27, 2023

Is this fix released in this version or it's planned in an upcoming release (61.0)?

It’s planned for 61.0.

If it's not yet released, when can we expect it or is there a way I can use it now?

You can the current main branch using pip install git+https://github.com/Kozea/WeasyPrint.git

@pareshbalar
Copy link
Author

pareshbalar commented Dec 27, 2023

Hi @liZe, I installed the current main branch using the cmd you mentioned.

image

However, the issue is still there.

Attached output pdf.
out.pdf

Am I missing anything?

FYI, I am on Windows.

WeasyPrint info output

image

@liZe
Copy link
Member

liZe commented Dec 27, 2023

You should use --force to force upgrading if WeasyPrint’s already installed:

py -3 -m pip install --force git+https://github.com/Kozea/WeasyPrint.git

@pareshbalar
Copy link
Author

Worked :)

Thanks a lot.

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