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

Retrieve path of pdf open in Acrobat DC in C#!

New Here ,
Jul 12, 2018 Jul 12, 2018

Copy link to clipboard

Copied

  Type PDFType = Type.GetTypeFromProgID("AcroExch.App");
     CAcroApp AcroAppObj = Activator.CreateInstance(PDFType) as CAcroApp;

     AcroAppObj.Show();

     CAcroAVDoc AvDocObj = AcroAppObj.GetActiveDoc() as CAcroAVDoc;

     CAcroPDDoc PdDocObj = AvDocObj.GetPDDoc() as CAcroPDDoc;

Now I have CAcroPDDoc object, but still unable find any library function which returns Path of document, could you please help in this.

     Type PDFType = Type.GetTypeFromProgID("AcroExch.App");
     CAcroApp AcroAppObj = Activator.CreateInstance(PDFType) as CAcroApp;

How can I get this file path? could you please help in this!

TOPICS
Acrobat SDK and JavaScript

Views

650

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

You replied to two discussions which told what do do !!

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

                Type PDFType = Type.GetTypeFromProgID("AcroExch.App");

                CAcroApp AcroAppObj = Activator.CreateInstance(PDFType) as CAcroApp;

                AcroAppObj.Show();

                CAcroAVDoc AvDocObj = AcroAppObj.GetActiveDoc() as CAcroAVDoc;

                CAcroPDDoc PdDocObj = AvDocObj.GetPDDoc() as CAcroPDDoc;

                Console.WriteLine(PdDocObj.GetNumPages());

                Console.WriteLine(PdDocObj.GetInfo(PdDocObj.GetFileName()));

                string fileName = PdDocObj.GetFileName();

              

                I can get the file name, but how can I get the full path?

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

Please read the discussions, which you replied to, and which told you what to do. Don't ask us to type it out again.

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