Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Python Code to convert bulk number of PDF documents to RTF

New Here ,
Aug 09, 2016 Aug 09, 2016

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")

TOPICS
Acrobat SDK and JavaScript , Windows
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 09, 2016 Aug 09, 2016
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines