Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Developers

Topic: Problem with PDEElementIsAtRect
Conf: (P-PDF) Developers, Msg: 82528
From: jlinfante
Date: 3/8/2003 02:32 PM

I'm a newer in depelopment of plug-in.
I need to build a prototype to tell to my boss about pdf potenciality. I suppose, next, my boss pay the "developer license or similar" for me.
My english is bad, please excuseme.
My problem is:
I'm developed a tool. I select the tool. I click on a pdf with a lot of PDEElements (PDEPath stroke). Then, I receive the x, y coordinates of mouse click. Then, I execute a loop searching on all PDEElements, where is the PDEElement it is touched.
But, the response of "PDEElementIsAtRect" is false, all times.
I attach the code.
Can you help me, please?

The fragment of code is (based in SnapZoom sample):
ACCB1 ASBool ACCB2 SnapZoomDoClick
(AVTool tool, AVPageView pageView, ASInt16 xHit,
ASInt16 yHit, ASInt16 flags, ASInt16 clickNo)
ASFixed currentZoom;
ASFixedRect apertureRect, apertureRect1;
AVGrafSelect pepe;
ASInt16 width, height;
ASFixedPoint p;
ASBool bEndedOperation = false;

AVDoc avDoc;
PDDoc pdDoc;
int pageNum;
PDPage pdPage;
PDEContent pdeContent;
PDEElement pdeElement;
int j;
AVRect rect;
char Texto[128];

AVPageViewBeginOperation (pageView);
AVPageViewDevicePointToPage(pageView, xHit, yHit, &p);

apertureRect.right=p.h + 100000;
apertureRect.left=p.h - 100000;
apertureRect.bottom=p.v + 100000; - 100000;

pdPage=PDDocAcquirePage(pdDoc, pageNum);
pdeContent=PDPageAcquirePDEContent(pdPage, gExtensionID);

sprintf(Texto, "right=%d left=%d bottom=%d top=%d", apertureRect.right,
apertureRect.left, apertureRect.bottom,;
sprintf(Texto, "NumElems=%d", PDEContentGetNumElems(pdeContent));
for(j=0; j {
pdeElement=PDEContentGetElem(pdeContent, j);
if(PDEElementIsAtRect(pdeElement, apertureRect)==TRUE)
AVAlertNote ("You click on a object!!!");
AVPageViewRectToDevice(pageView, &apertureRect, &rect);
AVPageViewDrawRectOutline(pageView, &rect, 1, NULL, 0);

jorge infante
technicall support
direccion de catastro
municipalidad de rosario
santa fe

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
Platinum Sponsor

Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.


Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.