mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
PDF Output: Fix custom size field not accepting fractional numbers as sizes
This commit is contained in:
parent
40136065f4
commit
7b22c622ed
@ -27,10 +27,10 @@ def get_custom_size(opts):
|
|||||||
custom_size = None
|
custom_size = None
|
||||||
if opts.custom_size != None:
|
if opts.custom_size != None:
|
||||||
width, sep, height = opts.custom_size.partition('x')
|
width, sep, height = opts.custom_size.partition('x')
|
||||||
if height != '':
|
if height:
|
||||||
try:
|
try:
|
||||||
width = int(width)
|
width = float(width)
|
||||||
height = int(height)
|
height = float(height)
|
||||||
custom_size = (width, height)
|
custom_size = (width, height)
|
||||||
except:
|
except:
|
||||||
custom_size = None
|
custom_size = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user