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:
Kovid Goyal 2014-04-05 18:40:06 +05:30
parent 2987737eb1
commit eef39ce248

View file

@ -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)