Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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,
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
The Issue is the code was working fine until a week ago. if its not supported, it shouldn't work in the first place.
Secondly, I tried deactivating my product completely and re activated it using the key that my team purchased and it worked. which means, the key is also active.
If ADOBE doesn't support will it throw an error message on the applications that use earlier versions of SDK?
I also tried to look into disassembly of Interop.Acrobat.dll and found the following which don't give much useful info.
namespace Acrobat
{
[TypeLibType(4288)]
[Guid("9B4CD3E8-4981-101B-9CA8-9240CE2738AE")]
[ComImport]
public interface CAcroAVDoc
{
[DispId(1)]
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
bool Open([MarshalAs(UnmanagedType.BStr), In] string szFullPath, [MarshalAs(UnmanagedType.BStr), In] string szTempTitle);
[DispId(2)]
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[return: MarshalAs(UnmanagedType.IDispatch)]
object GetPDDoc();
}
}
Anything you can think of or anything that I might have missed, please comment.
Thanks,
Copy link to clipboard
Copied
Actually, unsupported means that nobody tested this or is interested in giving out if it does not or no longer work. Every software company has to draw a line in the sand and say that only certain versions and configurations are supported. If you do something that is unsupported, you are on your own.
BTW, poking around in the DLL or the TLB is unsupported as well, only what is documented in the API documentation is supported.
Copy link to clipboard
Copied
Ok
I still didn't know why it worked previously and not now.
That said, i want to re install adobe acrobat standard x if it works.
Along side, is there any way that we can test/verify if acrobat standard x is installed and good?
Copy link to clipboard
Copied
Even if you put back Acrobat X – that version also forbids doing what you are doing in its EULA. And you have publicly disclosed that you are breaking that EULA. You may wish to take this up with your companies legal team…
Find more inspiration, events, and resources on the new Adobe Community
Explore Now