PDG naar Word Converter
import textract
import docx
def pdf_to_word(pdf_file, output_file):
# Tekst uit het PDF-bestand extraheren
text = textract.process(pdf_file)
# Een nieuw Word-document maken
document = docx.Document()
# De tekst toevoegen aan het document
document.add_paragraph(text)
# Het Word-document opslaan
document.save(output_file)
# Het PDF-bestand omzetten naar een Word-document
pdf_to_word(‘input.pdf’, ‘output.docx’)