mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-04 10:46:05 +01:00
DOCX Input: Dont fail on DOCX files that contain pages with zero effective width. Fixes #1303022 [Private bug](https://bugs.launchpad.net/calibre/+bug/1303022)
This commit is contained in:
parent
2987737eb1
commit
eef39ce248
1 changed files with 3 additions and 0 deletions
|
|
@ -250,6 +250,9 @@ def get_float_properties(self, anchor, style, page):
|
|||
width = float(style.get('width', '100pt')[:-2])
|
||||
|
||||
page_width = page.width - page.margin_left - page.margin_right
|
||||
if page_width <= 0:
|
||||
# Ignore margins
|
||||
page_width = page.width
|
||||
|
||||
hpos = get_hpos(anchor, page_width) + width/(2*page_width)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue