Skip to content

Commit

Permalink
Merge pull request #56 from abhisheky1806/patch-3
Browse files Browse the repository at this point in the history
feature to convert word to pdf easily
  • Loading branch information
anupkafle committed Oct 18, 2022
2 parents 8ae5bb0 + dc72723 commit 8cdd501
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions python/wordtopdf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from docx2pdf import convert;

try:
print("\n-------Word To PDF Converter-------\n")
inputDocx = input("Enter the Word file Name to Convert to PDF: ")
outputPDF = input("Enter the filename to save PDF: ")

# convert(inputDocx)
# convert("test.docx")
convert(inputDocx + ".docx", outputPDF + ".pdf")
print("Successful!!!!!\n")

except:
print("\nSomething went wrong\n")

0 comments on commit 8cdd501

Please sign in to comment.