Question
Could not locate a type library matching 'Acrobat'
I try to use pdf to excel function in Acrobat Reader DC, but I got an error of:
Could not locate a type library matching 'Acrobat'Here is my code to connect to Adobe:
excel_file = company_name + '.xlsx'
ERRORS_BAD_CONTEXT.append(winerror.E_NOTIMPL)
src=os.path.abspath(path_to_pdf)
win32com.client.makepy.GenerateFromTypeLibSpec('Acrobat')
adobe = win32com.client.DispatchEx('AcroExch.App')
avDoc = win32com.client.DispatchEx('AcroExch.AVDoc')
avDoc.Open(src, src)
pdDoc = avDoc.GetPDDoc()
jObject = pdDoc.GetJSObject()
jObject.SaveAs(excel_file, "com.adobe.acrobat.xlsx")
avDoc.Close(True)