PDG To Word Convertor
import textract
import docx
def pdf_to_word(pdf_file, output_file):
# Extract the text from the PDF file
text = textract.process(pdf_file)
# Create a new Word document
document = docx.Document()
# Add the text to the document
document.add_paragraph(text)
# Save the Word document
document.save(output_file)
# Convert the PDF file to a Word document
pdf_to_word(‘input.pdf’, ‘output.docx’)