Answers for "pdf to word converter python"

1

pdf to text python

#!pip install tabula-py
import tabula
#read all table data
df = tabula.read_pdf("sample.pdf",pages=[1,2])
df[1]

#tabula.convert_into("sample.pdf", "sample.csv", output_format="csv")
Posted by: Guest on June-26-2020
0

how to convert pdf to word using python

# credit to Stack Overflow user in the source link
# requires LibreOffice installed

import os
import subprocess

for top, dirs, files in os.walk('/my/pdf/folder'):
    for filename in files:
        if filename.endswith('.pdf'):
            abspath = os.path.join(top, filename)
            subprocess.call('lowriter --invisible --convert-to doc "{}"' # bash/shell syntax
                            .format(abspath), shell=True)
Posted by: Guest on July-02-2021

Python Answers by Framework

Browse Popular Code Answers by Language