Reason for Error "No form is open in Acrobat Viewer"

Ask a Question related to Adobe Acrobat SDK, Design and Development.

  1. #1

    Default Reason for Error "No form is open in Acrobat Viewer"

    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??
    Atin Wadehra Guest

  2. Similar Questions and Discussions

    1. Acrobat Pro does not open because : "language resources"
      Suddenly (I think after an update about a month ago) Acrobat Pro 6.0.2 refuses to open. I get this message : «The currently selected language...
    2. Gray Out "Save As" option when client open a6 Pro Mac form in 5 Std PC
      I have created a simple form in acrobat 6 pro Mac and I would like my client to open it in a Acrobat 5 PC and be able to "save as" with filled in...
    3. Acrobat Form Submit error: changes VALUE="true" to "0"
      I wrote an HTML page with a form. In the form I had many inputs as in: <INPUT TYPE="radio" NAME="Q1" VALUE="true"> and <INPUT TYPE="radio"...
    4. "Unable to open file for writing" - Acrobat PDF issue?
      Is anyone else getting the error message "Acrobat PDF file Format is having difficulties. Unable to open file for writing. It may be locked or...
    5. PDF and program won't open; "Error in Acrord32" "This program has performed an illegal operation and
      I recently had a browser hijacker. Fixed it with Norton and Lavasoft. Now, after downloading new Reader 6.0, I can't open anything. Only gives...
  3. #2

    Default Re: Reason for Error "No form is open in Acrobat Viewer"

    The error also comes if I make a call to AcroApp.Hide method before calling the OpenAVDoc method.
    Atin Wadehra Guest

  4. #3

    Default Re: Reason for Error "No form is open in Acrobat Viewer"

    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.
    NiceNix@adobeforums.com Guest

  5. #4

    Default Re: Reason for Error "No form is open in Acrobat Viewer"

    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
    Atin Wadehra Guest

  6. #5

    Default Re: Reason for Error "No form is open in Acrobat Viewer"

    I faced the same issue, and didn't find a way to get the collection of fields without showing Acrobat window.

    So, currently I call CAcroApp::Show then CAcroApp::Minimize before trying to get fields.

    By the way, which versions of Acrobat and Acrobat SDK do you use? Based on Acrobat 9 type library imported into VS2005 via class wizard:
    1) IAFormApp is abstract class, so you can't instantiate it via "new IAFormApp", I use CAFormApp class instead;
    2) I use method CAFormApp::get_Fields to get the collection of fields.
    Ivan_Pechorin@adobeforums.com Guest

  7. #6

    Default Re: Reason for Error "No form is open in Acrobat Viewer"

    Ivan,

    Am currently using Acrobat 7 and 7 SDK and have a workaround to call CAcroApp::Minimize just after OpenAVDoc for not showing the viewer.

    However this is not working in Acrobat 9. So, am waiting for a workaround in 9.0 before migrating.
    Atin Wadehra Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139