Copy link to clipboard
Copied
I'm having trouble programmatically adding a highlight annotation automatically after the user selects a piece of text in the pdf.
I believe my program should listen for PREVIEW_SELECTION_END event, takes the event data, which has bounding box information, before using it as the quad points of the new highlight annotation. I realized the bbox information cannot be directly used and must be converted (subtracting deviceTop/Bottom fields of selection bbox from screen height to get bounding boxes for annotation? not really working...) , and I couldn't find information on the bbox fields of PREVIEW_SELECTION_END event.
How are the two representations of bounding boxes (text selection v.s. annotation) different?
Have something to add?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now