Skip to main content
Participating Frequently
July 12, 2016
Question

CAcroAVDoc.Open() is returning false.

  • July 12, 2016
  • 1 reply
  • 2740 views

Hi,

We are using Acrobat API to process pdf files in certain way. while the app that does this worked till 2 days back . since two days it throwing Error. A close debugging revealed that CAcroAVDoc.Open() that we use to open the pdf file is returning false.

Nothing changed in the code that worked earlier and the same code is throwing error. So, I still looked into the issue and found out that very little space is  available on C drive(2 GB of 80 GB). So I am posting here to get answers to my following questions

1. Does spacing on C drive matter to execution of CAcroAVDoc.Open() method?

2. Is there any expiry date on the Acrobat license we purchased a year ago for this project that is making the project fail?

Here's a small snipped of our code.

public string processPDF(string pdfFile, string pstchip, string pstxprt) {

CAcroAVDoc avDoc = null; // logical doc

                CAcroPDDoc pdDoc = null; // physical doc

                object jso = null; // javascript bridge

                object[] args = null;

                try { // Acrobat API portion; throw any exceptions if necessary

                    /////////////////////

                    // Initializations //

                    /////////////////////

                    // get and open the logical doc

                    avDoc = new AcroAVDoc();

                    if (avDoc == null)

                        throw new PDFProcessingException("Acrobat API Error. Cannot initialize AcroExch.AVDoc");

                    if (!avDoc.Open(pdfFile, ""))

                        throw new PDFProcessingException("Acrobat API Error. Cannot access AVDoc.Open()"); //<---Erroring out here

                    // get the physical doc

                    pdDoc = (CAcroPDDoc)avDoc.GetPDDoc();

                    if (pdDoc == null)

                        throw new PDFProcessingException("Acrobat API Error. Cannot retrieve PDDoc");

Any suggestions would be helpful.

Thanks.

This topic has been closed for replies.

1 reply

Legend
July 12, 2016

1. Some temporary space should be needed, but this looks ok.

2. It is easy to check the license. Just start Acrobat and verify it works and opens a file. Verify it is NOT using Acrobat Reader, in case someone installed that.

Start Acrobat manually first and watch it as you run the script, in case there are errors.

Be sure the setup has not changed; Acrobat must be run in an interactive session. Make sure nobody has rearranged this into a service or background task.

Please tell us the version you have installed, exactly.

Participating Frequently
July 13, 2016

Thanks for the prompt reply.

I am able to open file in Acrobat. and I installed the Adobe API version 10.1.16

Actually, the PDF processing that I talked is being done by a windows service. However it shouldn't pose any problem as long as the API is installed right.

I attached a screenshot form Program Features. According to your comments this it looks like API licensing might not be an issue.4

pls comment.

Also, I couldn't find any info on the Open () method and in what cases it returns false. Any useful inputs in that area and a couple of examples.

Thanks,

Legend
July 13, 2016

I can't speak for Adobe but I am pretty sure that use from a service is absolutely not supported nor expected to work. By Adobe API I assume you mean Acrobat 10.1.16, which is not supported any longer anyway (it was superseded over 3 years ago). Many such uses are also contrary to the EULA. Adobe sell a suite of apps for server use.