pdftotext also need short names

This commit is contained in:
j 2016-01-31 23:01:52 +05:30
parent 5dead44107
commit 24d4c4dc70

View file

@ -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()