-
-
Notifications
You must be signed in to change notification settings - Fork 710
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
Error in write_pdf after Document.copy #880
Comments
Hello! Thank you for this report. Is it possible for you to give a specific example? It's hard to reproduce without a simple snippet. |
Feel free to reopen the issue if needed. |
Please reopen! Snippet to crash WeasyPrint: myhtml = HTML(string='<input type="checkbox">')
doc = myhtml.render()
doc.write_pdf('output1.pdf')
doc.write_pdf('output2.pdf') |
Will crash with this error: "'StackingContext' object has no attribute 'style'"
|
Hello @smeggingsmegger
That’s just when |
The problem comes from cfda2f1, that’s been written in 2012! When we have inline blocks (and now inline flex boxes), we insert a fake stacking context in box children. Modifying the tree is definitely a bad idea (just as modifying the style dictionary was), but we won’t change that right now. Note for the future: don’t modify the tree. Let’s just take the box in the stacking context when we meet one, that should be enough. |
I am getting the following error when combining multiple pages into a single document similar to how the example shows:
error:
The text was updated successfully, but these errors were encountered: