![]() |
| Adobe Forums » Software Discussions » Adobe Acrobat » Adobe SDK and Programming » Reason for Error "No form is open in Acrobat Viewer" |
| Tags: |
![]() |
| LinkBack | Thread Tools | Display Modes |
|
|||
|
Am trying to use the AcroForms plug-in using IAC in VC++ to populate fields by opening PDFs in memory. The method PDDoc->OpenAVDoc is bringing the Acrobat window in front. If I comment this method, am getting the error "No form is Open in Acrobat Viewer". Below is my code
// Create the Acro App object pAcroApp = new CAcroApp; pAcroApp->CreateDispatch("AcroExch.App", &OleExc) // Create the PDDoc object pAcroPDDoc = new CAcroPDDoc; pAcroPDDoc->CreateDispatch("AcroExch.PDDoc", &OleExc) // Open the PDF File pAcroPDDoc->Open(cstrPdfFile) // Create the AVDoc object pAcroAVDoc = new CAcroAVDoc; pAcroAVDoc->AttachDispatch(pAcroPDDoc->OpenAVDoc(cstrPdfFile), true); // Create the Forms Automation object pFormApp = new IAFormApp; pFormApp->CreateDispatch("AFormAut.App", &OleExc) // Get the collection of fields pFields = new IFields(pFormApp->GetFields()); The above line is producing the error mentioned above on commenting the OpenAVDoc method. Can someone provide help?? |
|
|||
|
You are getting this error message because your pFormApp object can't find a form to get the fields from. You have to open the form in the Viewer (via OpenAVDoc) first. The same is true for AcroApp.Hide. If you don't have a doc open, it has nothing to hide.
|
|
|||
|
Nix,
Am making the call to OpenAVDoc before creating the pFormApp object. Also, am unable to find out any documentation specifying the reason for this error and when it'll occur. There is only a single line mentioned about this error in the IACReference.pdf |
![]() |
| Thread Tools | |
| Display Modes | |
|
|