You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
1.2.0: _block_width treats a zero page margin as 1 inch, so tables are too narrow #1638
A margin explicitly set to 0 is falsy, so it counts as 1 inch. add_table() then computes the grid (w:tblGrid/w:gridCol) one inch narrower per zero margin. In 1.1.2 the width was page_width - left_margin - right_margin, and the table spanned the full page.
Word lays the table out from the cell widths and looks fine, but LibreOffice follows the grid and cuts text off. We hit it through pdf2docx, which copies the PDF's margins (often 0) into the section.
Suggested fix: fall back only when the value is missing, e.g. Inches(1) if section.left_margin is None else section.left_margin (same for right_margin and page_width).
Your None-only fallback suggestion checks out. I have a patch ready with zero/missing-margin and saved-document regression tests. On Windows/Python 3.11, 1,649 unit tests and 650 acceptance scenarios pass. I haven't verified LibreOffice rendering.
Would $20 in USDC on Base for the tested patch and a PR work for you?
Activity
ub3dqy commentedon Nov 3, 2026
Your None-only fallback suggestion checks out. I have a patch ready with zero/missing-margin and saved-document regression tests. On Windows/Python 3.11, 1,649 unit tests and 650 acceptance scenarios pass. I haven't verified LibreOffice rendering.
Would $20 in USDC on Base for the tested patch and a PR work for you?
Dima Mak / ub3dqy