From 7b22c622ed4dc91b7fa4ff8b7371c56f53037935 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 5 Dec 2012 12:23:44 +0530 Subject: [PATCH] PDF Output: Fix custom size field not accepting fractional numbers as sizes --- src/calibre/ebooks/pdf/writer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/pdf/writer.py b/src/calibre/ebooks/pdf/writer.py index a9cb951e35..76ab6b9096 100644 --- a/src/calibre/ebooks/pdf/writer.py +++ b/src/calibre/ebooks/pdf/writer.py @@ -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