mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 10:23:16 +02:00
PDF Output: Fix custom size field not accepting fractional numbers as sizes
This commit is contained in:
parent
40136065f4
commit
7b22c622ed
1 changed files with 3 additions and 3 deletions
|
|
@ -27,10 +27,10 @@ def get_custom_size(opts):
|
|||
custom_size = None
|
||||
if opts.custom_size != None:
|
||||
width, sep, height = opts.custom_size.partition('x')
|
||||
if height != '':
|
||||
if height:
|
||||
try:
|
||||
width = int(width)
|
||||
height = int(height)
|
||||
width = float(width)
|
||||
height = float(height)
|
||||
custom_size = (width, height)
|
||||
except:
|
||||
custom_size = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue