9 Replies Latest reply: Sep 7, 2012 4:46 AM by lrosenth RSS

    Creating a AcroAVDoc give me an error message

    jinny201209 Community Member

      I am trying to read the the content from a pdf file programmatically with C#, by adding reference to Acrobat.dll in the project and use APIs 

       

      This is the code which give me an error message "There was an error opening this document. This file cannot be found."

       

      public String getText()

      {

                  AcroAVDoc pdfDoc = new AcroAVDoc();

                  if (pdfDoc.Open(FileName, ""))

                  {

                       AcroPDPage page;

                       AcroPDDoc pdf = (AcroPDDoc)pdfDoc.GetPDDoc();

                       int pages = pdf.GetNumPages();

                    ......

      }

       

      My project file was successfully build. Through debugging, I found the error message was shown just running the above line of code in red.

      I also tested that opening PDF file in windows file browser, it works fine.

       

      Does anybody have the same problem before?