diff --git a/src/calibre/ebooks/lrf/pdf/convert_from.py b/src/calibre/ebooks/lrf/pdf/convert_from.py index 0fcbb8eb34..ade9c0368b 100644 --- a/src/calibre/ebooks/lrf/pdf/convert_from.py +++ b/src/calibre/ebooks/lrf/pdf/convert_from.py @@ -3,7 +3,7 @@ __copyright__ = '2008, Kovid Goyal ' '''''' import sys, os, subprocess, logging -from calibre import isosx, setup_cli_handlers, filename_to_utf8 +from calibre import isosx, setup_cli_handlers, filename_to_utf8, iswindows from calibre.ebooks import ConversionError from calibre.ptempfile import PersistentTemporaryDirectory from calibre.ebooks.lrf import option_parser as lrf_option_parser @@ -12,7 +12,8 @@ from calibre.ebooks.lrf.html.convert_from import process_file as html_process_fi PDFTOHTML = 'pdftohtml' if isosx and hasattr(sys, 'frameworks_dir'): PDFTOHTML = os.path.join(getattr(sys, 'frameworks_dir'), PDFTOHTML) - +if iswindows and hasattr(sys, 'frozen'): + PDFTOHTML = os.path.join(os.path.dirname(sys.executable), 'pdftohtml.exe') def generate_html(pathtopdf, logger): '''