Created
October 15, 2020 19:37
-
-
Save AvinashDalvi89/3db0d6039ec6e0c9063b2daa9c920a82 to your computer and use it in GitHub Desktop.
Converting Doc to PDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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