OT, automating Acrobat

Hi group,

I’m trying to read some form information from PDF files. I’m trying to connect to Acrobat from Python in Rhino, and looking at every example I can Google I seem to be missing something. I’m successfully able to connect to Acrobat Pro XI and open the file and get a reference to it–confirmed by trying out grabbing some basic properties–but long story short I can’t figure out how to correctly use the getField method to get a reference to a form field, I can’t find the right context in which to call it, neither on the “app” nor the “document” nor the “Javascript object” works. It seems like (if you look up this stuff) the “GetJSObject” step isn’t working, it doesn’t crash but anything I attempt to call on the object(whether a valid procedure or not) returns the baffling error “Value does not fall within the expected range”

Here’s a sample code:

from System import Type, Activator

def main():
TestFile=“your-pdf.pdf"
AVDoc=Activator.CreateInstance(Type.GetTypeFromProgID(“AcroExch.AVDoc”))
AVDoc.Open(TestFile,”")
ppdoc=AVDoc.GetPDDoc()
jso=ppdoc.GetJSObject()
print jso.getField(‘ReferenceID’).value()

if name==“main”:
main()

Thanks,
Jim