Pdf to docx

 from pdf2docx import Converter


def convert_pdf_to_docx(pdf_path, output_docx):

    cv = Converter(pdf_path)

    cv.convert(output_docx, start=0, end=None)

    cv.close()

    print(f"Conversion successful: {pdf_path} to {output_docx}")


# Replace 'input.pdf' with the path to your PDF file

input_pdf = 'path/to/your/input.pdf'


# Replace 'output.docx' with the desired output DOCX filename

output_docx = 'path/to/your/output.docx'


# Convert PDF to DOCX

convert_pdf_to_docx(input_pdf, output_docx)


Comments

Popular posts from this blog

card slot machine

Programming

Card Game In Python