These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Acrobat SDK and how to use GetAperture function or something better.

lemmondg
Registered: Jan 22 2007
Posts: 2

I am trying to drag and drop on a PDF document painted on a Panel using OpenInWindowEx I need to get the exact point in the document to do it. So far everything I have tried gives a point in reference to the whole work area gray-space, scrollbars, toolbars, document, etc. I need to know how get the exact location of the document. I think this is called the aperture or crop-box. I have found the function AVDoc.GetAvPageView.GetAperture, but can't figure out how to use it in Delphi or VB. This is the only thing holding me up. Can someone please please please help me.

My Product Information:
Acrobat Pro 7, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
I havn't used this function myself, but the manual states that "AVExch.GetAperture" returns a CAcroRect Object, which is listed in the reference under "AcroExch.Rect". This is an object with 4 members, Bottom, Left, Right, and Top.

For debugging you should have a variable for each stage of the process and then step though the code making sure that each value returned is correct.

Thom Parker
WindJack Solutions
[url=http://www.windjack.com]www.windjack.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script