Skip to content

write_html: fit a table wider than the page to the page width, and ig… - #2017

Merged
andersonhc merged 1 commit into
py-pdf:masterfrom
RavSinghChandan:html-table-width-beyond-page
Oct 13, 2026
Merged

andersonhc merged 1 commit into
py-pdf:masterfrom
RavSinghChandan:html-table-width-beyond-page

Conversation

@RavSinghChandan

Copy link
Copy Markdown

<table width="150%">, width="1000px" or style="width: 120%" raised ValueError: Invalid value provided width=...: effective page width is ... from Table, and a negative width raised FPDFException: Not enough horizontal space. Browsers let a too-wide table overflow and ignore a negative width. A PDF page has nowhere to overflow to, so the table is now drawn at the page width, with a warning, and a negative width is ignored. Widths within the page are unchanged. Added tests.

@andersonhc
andersonhc merged commit e04bd29 into py-pdf:master Oct 13, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants