HighlightSelection

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

anti_g
User
Posts: 22
Joined: Thu Apr 02, 2009 9:55 am

HighlightSelection

Post by anti_g »

Hi,

how can I set the content property of a highlight annotation created by HighlightSelection commando?
Setting the content afterwards by JavaScript is possible, but how do I identify the right annotation? (getAnnot or something like that?)

A related issue: I call SetProperty("Commenting.CopySelTextToHilightPopup", 1, 0).
It works with the highlight tool, but when I create a comment by HighlightSelection the selected text does not appear in the associated sticky note box. Why?
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: HighlightSelection

Post by Corwin - Tracker Sup »

The Viewer ActiveX does not currently have functionality to modify existing comments in a PDF.

For now the only way to do this is to use JS. We are working new functionality which will allow the addition/editing of comments in a PDF document using the ActiveX methods.
I call SetProperty("Commenting.CopySelTextToHilightPopup", 1, 0).

It works with the highlight tool, but when I create a comment by HighlightSelection the selected text does not appear in the associated sticky note box.
This problem will be fixed in the new build due later this week if all goes to plan - thanks for report.
anti_g
User
Posts: 22
Joined: Thu Apr 02, 2009 9:55 am

Re: HighlightSelection

Post by anti_g »

Hi Corwin,
For now the only way to do this is to use JS.
How exactly? My problem is identifying the right comment. When I right-click it, what should I pass to JS, the mouse coordinates? And then?
Come on, it must work somehow, it works with your context menu (Open comment).
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: HighlightSelection

Post by Corwin - Tracker Sup »

Well, you can get rects for all annots on the page and check what rect contains mouse coordinates.
anti_g
User
Posts: 22
Joined: Thu Apr 02, 2009 9:55 am

Re: HighlightSelection

Post by anti_g »

This problem will be fixed in the new build due later this week if all goes to plan - thanks for report.
Any idea what the status of the development is? Can I count on the new build in the next couple of days?
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: HighlightSelection

Post by Corwin - Tracker Sup »

It’s on the testing stage. So I hope that tomorrow new build will be available for download.