From 85a04d93c562e4d8b25d84d27239ecd8a8b18277 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 4 Jun 2018 07:37:06 +0530 Subject: [PATCH] PDF Input: Fix background color being incorrectly set to gray when converting many PDF files. Workaround for bug in pdftohtml --- src/calibre/ebooks/pdf/pdftohtml.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/ebooks/pdf/pdftohtml.py b/src/calibre/ebooks/pdf/pdftohtml.py index 9618067cd4..69b7724147 100644 --- a/src/calibre/ebooks/pdf/pdftohtml.py +++ b/src/calibre/ebooks/pdf/pdftohtml.py @@ -109,6 +109,9 @@ def pdftohtml(output_dir, pdf_path, no_images, as_xml=False): raw = re.sub(br'. The + # background color is incorrect + raw = re.sub(b'', b'', raw) i.write(raw)