Docx to PDF using Python
Nov 27, 2020
We now no need to use external websites to convert .docx to .pdf . We can now convert it ourselves and we can secure our data also… Here comes the library in Python which is helpful in converting our .docx file to .pdf
Installation :
pip install docx2pdf
Uninstall :
pip uninstall docx2pdf
Code :
from docx2pdf import convert
convert("Gate_Syllabus.docx")
After running the program the output file will be stored in the same folder where the input file is present and with same name as the input file.
Finally, We converted .docx extension to .pdf extension using python.
Happy Coding 😁😁