Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable setting render text mode to enchanced #390

Merged
merged 1 commit into from
Oct 10, 2018

Conversation

tibor-mirnic
Copy link

There is a problem with selecting text in browsers other that Firefox, selection jump to the top/bottom of
the page when cursor moves over white space ( space, paragraph, new line etc. ). I am pretty sure the
problem is with additional div.endOfPage element, only Firefox disables user-select on it.

When you set textLayerMode to 'ENHANCED' then it works as expected.

@VadimDez VadimDez merged commit 2c13194 into VadimDez:master Oct 10, 2018
@sChupin
Copy link

sChupin commented Apr 11, 2019

I've just tested the three different modes for the introduced [render-text-mode] input and I can't see any difference in the way the text selection is working.

For the three modes (DISABLED, ENABLED and ENHANCED), the text is selectable and the problem discussed in the comment of tibor-mirnic is happening.

Can you explain me what this input is supposed to do? Thank you

@sChupin
Copy link

sChupin commented Apr 25, 2019

I still don't get the difference between ENABLED and ENHANCED mode.
I can see in the code of text_layer_builder.js these lines:

if (!this.enhanceTextSelection) {
  let endOfContent = document.createElement('div');
  endOfContent.className = 'endOfContent';
  this.textLayerDiv.appendChild(endOfContent);
}

But I don't see the difference when selecting the text in a PDF. Do you have a use case when this changes the behavior of the selection?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants