October 9, 2022

How to convert any pfd file📝 into editable doc file using python

In this article we are going to explore how we can convert ant PDF file into editable doc (Word) file and can perform many more customization

Installation of libraries

pip install pdf2docx

Importing libraries

from pdf2docx import Converter

Implementation

Here we are going to take 1 pfd file for example ‘pdf1.pdf’ and we are going to convert to docx file. Remember that the sample pdf file should be present in the same directory as the project location as of now .

pdf ='pdf1.pdf'
word ='word1.docx'
cv = Converter(pdf)
cv.convert(word,start=0,end=None)
cv.close()

This converts the pdf into docx file and even we can edit it as we want. We will be able to locate the file in the same directory as the project.


Social Share Button :

3 comments on “How to convert any pfd file📝 into editable doc file using python”

Leave a Reply

Your email address will not be published. Required fields are marked *

chevron-down-circle
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram