diff --git a/oml/media/pdf.py b/oml/media/pdf.py index 2ce2b31..dbcb5db 100644 --- a/oml/media/pdf.py +++ b/oml/media/pdf.py @@ -226,6 +226,8 @@ def extract_text(pdf): if sys.platform == 'darwin': cmd = ['/usr/bin/mdimport', '-d2', pdf] else: + if sys.platform == 'win32': + pdf = get_short_path_name(pdf) cmd = ['pdftotext', pdf, '-'] p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate()