From f6eb9b0ba56194400e021ca9910cc60b0bf78b25 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 2 Sep 2013 11:24:02 +0530 Subject: [PATCH] PDF Output: Accept commas in custom paper size specification Used in some European countries. --- src/calibre/ebooks/pdf/render/from_html.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/pdf/render/from_html.py b/src/calibre/ebooks/pdf/render/from_html.py index ad27635c59..aaa4fbd5a2 100644 --- a/src/calibre/ebooks/pdf/render/from_html.py +++ b/src/calibre/ebooks/pdf/render/from_html.py @@ -41,8 +41,8 @@ def get_page_size(opts, for_comic=False): # {{{ width, sep, height = opts.custom_size.partition('x') if height: try: - width = float(width) - height = float(height) + width = float(width.replace(',', '.')) + height = float(height.replace(',', '.')) except: pass else: