Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Get Path of PDF Opened in Acrobat DC Pro

New Here ,
Mar 23, 2018 Mar 23, 2018

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

TOPICS
Acrobat SDK and JavaScript
1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 23, 2018 Mar 23, 2018

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

Translate
Community Expert ,
Mar 23, 2018 Mar 23, 2018

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

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 13, 2018 Jul 13, 2018

I still can't get the path in c#, how can I do it? Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 13, 2018 Jul 13, 2018
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines