|
@ -81,9 +81,6 @@ def unoconv_environ(): |
|
|
uno_path = config.get('uno_path', False) |
|
|
uno_path = config.get('uno_path', False) |
|
|
if uno_path: |
|
|
if uno_path: |
|
|
env['UNO_PATH'] = config['uno_path'] |
|
|
env['UNO_PATH'] = config['uno_path'] |
|
|
|
|
|
|
|
|
#env['UNO_PATH'] = "C:\\Program Files\\LibreOffice 5\\program" |
|
|
|
|
|
|
|
|
|
|
|
return env |
|
|
return env |
|
|
|
|
|
|
|
|
def convert(input_path, output_path, doctype="document", format="pdf"): |
|
|
def convert(input_path, output_path, doctype="document", format="pdf"): |
|
@ -164,4 +161,4 @@ def convert_binary(binary, mimetype=None, filename=None, export="binary", doctyp |
|
|
else: |
|
|
else: |
|
|
return file.read() |
|
|
return file.read() |
|
|
finally: |
|
|
finally: |
|
|
shutil.rmtree(tmp_dir) |
|
|
|
|
|
|
|
|
shutil.rmtree(tmp_dir) |