PDF Embed Api - coordinates of the highlighted text

New Here ,
Jan 24, 2021 Jan 24, 2021

Copy link to clipboard

Copied

Hello,

 

Is there a way a to retreive the coordinates of the  highlighted text in the viewer. 

We are listening to AdobeDC.View.Enum.PDFAnalyticsEvents.TEXT_COPY and we wantto get the coordinates of the copied text.

 

The event parameter does not contain the coordinates details, is there a way like to execute a command and then get the coordinates of the highlighted text?

 

 

Thanks,

TOPICS
PDF Embed API

Views

164

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 25, 2021 Jan 25, 2021

Copy link to clipboard

Copied

Thanks for using PDF Embed API. If you are selecting the text in the viewer, you will receive an event (PREVIEW_SELECTION_END), which might help your cause.
Please visit https://www.adobe.io/apis/documentcloud/dcsdk/docs.html?view=view. You will get the required information under section Basic events.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 25, 2021 Jan 25, 2021

Copy link to clipboard

Copied

Thanks

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 03, 2021 Feb 03, 2021

Copy link to clipboard

Copied

We are able to get coordinates now, the next step is to translate these values into the boundbox and or quadpoints for a new highlight annotation. Is this possible? We want to automatically create an annotation object right after some text(s) are highlighted setting the bodyValue as the highlighted content.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 08, 2021 Feb 08, 2021

Copy link to clipboard

Copied

Are you sure you want to do that? What if the user highlighted more or less than they intended. My suggestion would be to capture the selected text and if a highlight is added but a new selection is made without adding a body value to the previous highlight, set the bodyValue to the previously selected text. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 10, 2021 Feb 10, 2021

Copy link to clipboard

Copied

Yes, that is what we are trying to accomplish.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 10, 2021 Feb 10, 2021

Copy link to clipboard

Copied

LATEST

I'll put together an example and you can see how I did it. I'll need a day or two.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines