Skip to main content
vamsi_krishnas90254928
New Participant
August 9, 2016
Question

Python Code to convert bulk number of PDF documents to RTF

  • August 9, 2016
  • 1 reply
  • 1122 views

I was using  python acrobat pdf package to convert PDF to RTF files. But, sometimes the code gets stuck because of some issue within the pdf documents and fails to convert rest of them untill I manually close the PDF document that opens because of the issue. I tried to kill acrobat.exe, but it didn't help since I think the code gets stuck in the conversion line itself. Could some one help me get through this. It is quite tedious to close a file when it gets open and let the program run for rest of the documents when you are dealing with thousands of files.

PDF.acrobat_extract_rtf(pathInput+a, pathOutput, a,'.rtf')

os.system("taskkill /im Acrobat.exe")

This topic has been closed for replies.

1 reply

Brainiac
August 9, 2016

Adobe doesn't provide any Python interface. You'd need to take this up with the authors of that.

But Acrobat is designed for only very low levels of automation - "thousands of files" makes me think you have the wrong tool. Acrobat plug-ins can intercept the majority of errors (not all), but OLE cannot. In general, though, you are expected to be there to click when automating your handful of files.