mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -250,6 +250,9 @@ class Images(object):
|
||||
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…
x
Reference in New Issue
Block a user