Is there any way (via the COM interface) to detect when Acrobat has fully finished drawing a loaded PDF?
I'm experiencing crashes and random misbehaviour of Acrobat (both on the latest DC Pro and even back on 8.3) as when launching an embedded PDF from an IBM (Lotus) Notes document AcroAXApp is giving me an AVDoc instance that hasn't finished drawing, so making calls against it (and its associated PDDoc) upsets Acrobat.
I'm basically trying to script extracting OLE Embedded PDFs from an IBM (Lotus) Notes database. When I make COM call to Lotus Notes to activate an embedded PDF it loads the PDF in Acrobat and I get back an AcroAXApp object which has a Document method which returns an instance of AcroAVDoc. From that AVDoc I can get the PDDoc and call Save against it and then Close.
The problem I'm running into is that when I call AcroAXApp.Document it seems it will return the AVDoc before it's finished drawing it on screen, so depending on the timing of my code I can get all sorts of odd errors and total crashes calling methods against AVDoc and its associated PDDoc (sometimes on Save, sometimes on Close, sometimes on the next document).
By chance I found that if my running code displays a modal dialog (including using MessageBox) for a short period of time after activation and prior to making use of AVDoc and PDDoc then Acrobat can complete drawing the loaded PDF and calling methods on both proceeds without issue (on the somewhat slow test environment I'm using, 1 second seems to be reliable).
So is there any way for me, from the COM interface, to detect when Acrobat has finished drawing the AVDoc and its safe to start making calls against it?
