Copy link to clipboard
Copied
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:
//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
Copy link to clipboard
Copied
There is no product with the name Acrobat Reader Pro. You need Adobe Acrobat Standard or Pro.
Copy link to clipboard
Copied
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]
Copy link to clipboard
Copied
Look at the documentation:
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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)
Copy link to clipboard
Copied
You can get the annotations of the page with the method GetAnnot.
Info: There is no product with the name Acrobat Reader PRO!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
}
}
Copy link to clipboard
Copied
Are there annotations in the document?
Copy link to clipboard
Copied
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