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

New line not recognised and instead combines words together without a space #8777

Closed
pchasty opened this issue Aug 14, 2017 · 5 comments
Closed

Comments

@pchasty
Copy link

pchasty commented Aug 14, 2017

We are trying to implement our own search into viewer.js that avoids partial matches.
However we are not getting accurate results as the var 'pageContent' string contains words that have been joined together due to pdf.js not recognising or dealing with new lines.
This is also observed when copying and pasting text that includes new lines from the pdf rendered by pdf.js, and contrasts with behaviour shown by Adobe with dealing with new lines.

Bug can be observed on the pdf.js demo.

Configuration:

  • Google Chrome 54.0.2840.99 m (64-bit)
  • Windows 7 Enterprise 6.1.7601
  • pdfjs-1.8.188 and viewable in demo PDF.js:

Steps to reproduce the problem:

  1. Copy and paste from the title of the demo pdf, or anywhere where a new line can be observed
  2. Paste into a text editor

What is the expected behavior?
The pasted text should be:
Trace-based Just-in-Time Type Specialization for Dynamic Languages

What went wrong?
The pasted text is:
Trace-based Just-in-Time Type Specialization for DynamicLanguages
(where the words 'Dynamic' and 'Languages' have been joined together rather than separated by space)

@timvandermeij
Copy link
Contributor

timvandermeij commented Aug 14, 2017

This a known issue and a patch has been proposed to fix this (#5783), but it was never finished. If someone likes to work on that, please feel free to do so.

@Siddhinita
Copy link

@timvandermeij , I want to work on this issue.

@timvandermeij
Copy link
Contributor

It's yours! Contact us on IRC if you have questions.

@rossdash
Copy link

rossdash commented Apr 9, 2018

has any progress been made with this issue?

@Snuffleupagus
Copy link
Collaborator

WFM, most likely fixed by PR #13257.

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

No branches or pull requests

5 participants