Skip to main content
tertiusOfestino
Participant
November 5, 2020
Question

PDF Embed API - Annotation & Search

  • November 5, 2020
  • 2 replies
  • 996 views

Hi Adobe Forum,

We have a unique request, not sure if it's possible, but would appreciate some guidance if it is.

1. When adding an annotation, is it possible to get the selected text from that annotation, not only the bounding boxes?

2. Is it possible to programatticaly do a text search in a document?

3. If yes, is it possible to limit search to the current page you are on, and not the complete document?

 

Any help in this regard would be greatly appreciated!

 

PS: Love what the people at Adobe are doing!!!

    This topic has been closed for replies.

    2 replies

    Participant
    November 11, 2020

    by

    Joel Geraci
    Community Expert
    Community Expert
    November 5, 2020

    I'll respond to the questions in order...

    1. Yes. You can hook into the FilePreviewEvents.PREVIEW_SELECTION_END callback and track what text was selected. Then if a new annotation is created, you can compare the rectangles and see if the selected text was annotated.
    2. No... but in other posts it's been stated that it's coming.
    3. Not sure.