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

Searching by whole word #5697

Closed
jazzy-em opened this issue Feb 4, 2015 · 5 comments
Closed

Searching by whole word #5697

jazzy-em opened this issue Feb 4, 2015 · 5 comments
Labels

Comments

@jazzy-em
Copy link
Contributor

jazzy-em commented Feb 4, 2015

Hello!
I want to make the possibility of a whole word search.
For example, if I search for 'up', I want to see in the search results just a 'up', not 'startUP' or 'sUPports'.
I understand that it is contrary to Firefox's built-in highlight behavior, but it is necessary for my application.
The main problem that I faced is the inability to determine a line break in the text extracted from the page (on viewer layer).
In PDFFindController_extractText() function we get text from PDF document to pageContents variable, but all lines on page are glued.
Tell me, please, can I some way to split a strings in extracted text on viewer layer?
Or need to change core layer? If yes, where is the best place in code for this changes?

@jazzy-em
Copy link
Contributor Author

jazzy-em commented Feb 4, 2015

May be line break can be detected in 'case OPS.moveText:' (core/evaluator.js, PartialEvaluator_getTextContent(...))? Or is this the wrong way?

@timvandermeij
Copy link
Contributor

@ananyaojha Please do not post unrelated questions in issues. Use the mailing list for your question instead (https://groups.google.com/forum/#!forum/mozilla.dev.pdf-js) or try the IRC channel.

@chitgoks
Copy link

im curious with this feature. is there a plan to add this?

if so, would love to find the link for progress. would love to track this.

@Snuffleupagus
Copy link
Collaborator

For example, if I search for 'up', I want to see in the search results just a 'up', not 'startUP' or 'sUPports'.

@timvandermeij This issue could probably be closed now, since the feature described above was implemented by PR #10028.

@timvandermeij
Copy link
Contributor

Closing since this is indeed fixed by the PR above.

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

No branches or pull requests

4 participants