Skip to content

Instantly share code, notes, and snippets.

@AvinashDalvi89
Created October 15, 2020 19:37
Show Gist options
  • Save AvinashDalvi89/3db0d6039ec6e0c9063b2daa9c920a82 to your computer and use it in GitHub Desktop.
Save AvinashDalvi89/3db0d6039ec6e0c9063b2daa9c920a82 to your computer and use it in GitHub Desktop.
Converting Doc to PDF
import subprocess
subprocess.check_call(
[‘/usr/bin/python3’, ‘/usr/bin/unoconv’, ‘-f’, ‘pdf’, ‘-o’, pdffilename, ‘-d’, ‘document’,
newfilename])
except subprocess.CalledProcessError as e:
print(‘CalledProcessError’, e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment