-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdoc2pdf.py
More file actions
21 lines (14 loc) · 714 Bytes
/
Copy pathdoc2pdf.py
File metadata and controls
21 lines (14 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from docx2pdf import convert # Conversion of document to pdf module
import config # Importing input and output directory paths
import audioengine
print("Converting document to PDF".center(400))
audioengine.speak("Converting document to PDF")
print("Enter the name of file without extension:")
audioengine.speak("Enter the name of file without extension")
filename = input()
inputfile = (config.inputpath+filename+".docx") # Saving the input file path
outputfile = config.outputpath+filename + \
"-converted.pdf" # Saving the output file path
convert(inputfile, outputfile)
print("Your file has been converted successfully".center(400))
audioengine.speak("Your file has been converted successfully")