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

Get Path of PDF Opened in Acrobat DC Pro

New Here ,
Mar 23, 2018 Mar 23, 2018

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

TOPICS
Acrobat SDK and JavaScript

Views

1.2K

Translate

Translate

Report

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

Votes

Translate

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

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

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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