Copy link to clipboard
Copied
I just wish to retrieve the path of PDF document opened in Acrobat DC Pro, and save paths to my database in c#,
I able to get active pdf document in c# but unable to retrieve path of the document,
Type PDFType = Type.GetTypeFromProgID("AcroExch.App");
CAcroApp AcroAppObj = Activator.CreateInstance(PDFType) as CAcroApp;
CAcroAVDoc AvDocObj = AcroAppObj.GetActiveDoc() as CAcroAVDoc;
CAcroPDDoc PdDocObj = AvDocObj.GetPDDoc() as CAcroPDDoc;
But not getting path of of that document, is there any other way to achieve this?
Help will be much appreciated
There isn't a function in the OLE API for acquiring a path, but you can get this information with JavaScript.
Use the PDDoc object to acquire the JSO, and then use it to get the path property.
Dim jso as Object
Dim path as String
jso = gPDDoc.GetJSObject
path = jso.path
Copy link to clipboard
Copied
There isn't a function in the OLE API for acquiring a path, but you can get this information with JavaScript.
Use the PDDoc object to acquire the JSO, and then use it to get the path property.
Dim jso as Object
Dim path as String
jso = gPDDoc.GetJSObject
path = jso.path
Copy link to clipboard
Copied
I still can't get the path in c#, how can I do it? Thanks
Copy link to clipboard
Copied
We described how to do it. Your question won’t help, since all we could do is repeat what we already said. So please show your code and tell us what goes wrong.