• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Using getSelectedContent to retrieve the selected text

Explorer ,
Nov 24, 2020 Nov 24, 2020

Copy link to clipboard

Copied

I have selected three lines of text in a pdf ....
These lines contain three words LEADERSHIP,  ECONOMY and LIFESTYLE.

I am using the "PREVIEW_SELECTION_END" event ,this returns the 3 bounding boxes for the lines of text.

 

I then call the api getSelectedContent and this is working succesfully, but unfortunately the result it is returning is LEADERSHIPECONOMYLIFESTYLE.

 

As you can see all three lines of text have been concatenated and I can't see how I can turn it into anything meaningful.

 

Any idea how to get usable strings from getSelectedContent?

 

TIA

Rob

Views

744

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
Explorer ,
Nov 24, 2020 Nov 24, 2020

Copy link to clipboard

Copied

I compared selecting the same 3 lines and clicking the "copy" button in Acrobat and in the Viewer and then pasting

In Acrobat the 3 lines paste in as 3 crlf seperated lines, in the Viewer they paste in as a single line without spaces between the words.

FWIW they paste as 3 seperate lines in PDFJS and in Chrome Native. 

 

From what I can see this bug has no current workaround, any suggestions?

 

Rob

Votes

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 ,
Dec 03, 2020 Dec 03, 2020

Copy link to clipboard

Copied

Thanks for using PDF Embed API. Currently, it looks like a limitation of PDF Embed API. We will consider this suggestion in our future enhancements.

Votes

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 ,
Jun 05, 2021 Jun 05, 2021

Copy link to clipboard

Copied

Team, Is this resolved? if not any date for this feature release?

Votes

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 ,
Jun 09, 2021 Jun 09, 2021

Copy link to clipboard

Copied

We have taken note of this request and will let you know when it is resolved. Stay tuned!

Votes

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 ,
Aug 10, 2024 Aug 10, 2024

Copy link to clipboard

Copied

LATEST

Hi, I am having the same issue, has there been any progress made on this issue

Votes

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
Resources