I try to convert pdf to docx with Libreoffice,and I use this method provided at Convert PDF to DOC (Python/Bash) ,the code is as follows:
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 "{}"'
.format(abspath), shell=True)
However, when I debug it, I get an error:
Error: source file could not be loaded
Error: no export filter for C:\Users\owner\desktop\docx\my.docx found, aborting.
Error: no export filter
I've searched this using Google a while,however there is no any answer fit to my question.So I'm here asking for help. Thanks a lot!