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

using Acrobat.dll

New Here ,
Jul 05, 2019 Jul 05, 2019

Hello,

I would like to integrate Acrobat Reader support into my company's project, in order to be able to disassemble the pdf documents on the elements.
I downloaded the TRIAL version Acrobat Reader Pro and added Acrobat.dll to my project(.net). After I read the documentation in the Adobe SDK, I could not get XObject page. Please answer me the following questions:

  1. How can I get items from current page

//example

CAcroApp App = new AcroAppClass();

CAcroAVDoc AvDoc = new Acrobat.AcroAVDoc();

if (AvDoc.Open(PathToFile, ""))

{

     AcroAVPageView avPageView = (AcroAVPageView) AvDoc.GetAVPageView();

     for (int iPage = 0; iPage < pdDoc.GetNumPages(); iPage++)

     {            

          var pdPage = (AcroPDPage)pdDoc.AcquirePage(iPage);

          // todo "How can I get items from current page?"

     }

}

     2. Is it possible to connect to an already running process Reader? 

//example if it can work

TOPICS
Acrobat SDK and JavaScript
3.9K
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
Community Expert ,
Jul 05, 2019 Jul 05, 2019

There is no product with the name Acrobat Reader Pro. You need Adobe Acrobat Standard or Pro.

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 05, 2019 Jul 05, 2019

I agree with you. But my question about using ФBut my question is about using Acrobat.dll

[Here is the list of all Adobe forums... https://forums.adobe.com/welcome]

[Moved from user to programming forum... Mod]

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
Community Expert ,
Jul 05, 2019 Jul 05, 2019

Look at the documentation:

Acrobat DC SDK Documentation

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
Adobe Employee ,
Jul 05, 2019 Jul 05, 2019

As described in the Acrobat SDK (which I am sure you downloaded since it has all the documentation and sample code for developing with Acrobat), you will see that those methods are only provided in Acrobat Pro and not in Acrobat Reader.

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 07, 2019 Jul 07, 2019

I read the SDK.. But I could not get the page elements.

@Leonard_Rosenthol If I understand you correctly. There is no mechanism to connect to the Acrobat Reader version?

About Acrobat Reader PRO. The question remains open. Maybe someone will tell the method

how can i get items from page?

Thanks for the links to sdk, but it has already been read)

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
Community Expert ,
Jul 08, 2019 Jul 08, 2019

You can get the annotations of the page with the method GetAnnot.

Info: There is no product with the name Acrobat Reader PRO!

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 08, 2019 Jul 08, 2019

Using IAC you can access annotations and form fields. Page contents are not accessible, you have to write a plug-in using C/C++. Forget about using the free Reader, each end user needs to pay for Acrobat. Please do not talk about Acrobat Reader Pro any more. This does not exist, so we may give up trying to answer if you keep asking about a nonexistent product.

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 08, 2019 Jul 08, 2019

I'm talking about using Acrobat.dll

when i try use GetAnnot method( var annot = pdPage.GetAnnot(iPage); ) Always get return null, what i need to do

CAcroApp App = new AcroAppClass();

CAcroAVDoc AvDoc = new Acrobat.AcroAVDoc();

if (AvDoc.Open(PathToFile, ""))

{

     AcroAVPageView avPageView = (AcroAVPageView) AvDoc.GetAVPageView();

     for (int iPage = 0; iPage < pdDoc.GetNumPages(); iPage++)

     {           

          var pdPage = (AcroPDPage)pdDoc.AcquirePage(iPage);

          var annot  = pdPage.GetAnnot(iPage);                                    // Always return null

     }

}

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
Community Expert ,
Jul 08, 2019 Jul 08, 2019
LATEST

Are there annotations in the document?

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
Community Expert ,
Jul 08, 2019 Jul 08, 2019

Hi,

pdPage.GetAnnout ( index of annot on page to get);

you probably want to call GetNumAnnots(); first to make sure there are any annots to get, and then use the value returned as your loop to go through each annot on the page.

Regards

Malcolm

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