Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #pdf #word #python
ADD COMMENT
Topic
Name
7+1 =