stephanrauh / ngx-extended-pdf-viewer

A full-blown PDF viewer for Angular 16, 17, and beyond
https://pdfviewer.net
Apache License 2.0
473 stars 181 forks source link

highlightAll functionality is not working #2526

Closed rohan-gosavi closed 3 weeks ago

rohan-gosavi commented 3 weeks ago

Hi i am facing an issue with highlightAll feature:

  1. Set highlightAll flag as true
  2. Search any text
  3. now if you observe not all the matching terms are highlighted only the current term is highlighted
  4. in DOM term match is not wrapped in span.highlight
stephanrauh commented 3 weeks ago

Please update to the latest minor version (21.3.5 or higher). I've fixed a few bugs. Maybe your bug is among them.

When I tried to reproduce your issue, everything worked fine. If you issue doesn't go away by updating, I need your help on how to reproduce the issue.

image
stephanrauh commented 3 weeks ago

Update: it seems that "highlight all" only works in the "bleeding edge" branch of version 21.3.5. The stable branch does not work.

imskrishnan commented 3 weeks ago

Hi @stephanrauh. Does this have support for angular version 16?

stephanrauh commented 3 weeks ago

Yes, at the moment, ngx-extended-pdf-viewer support Angular 16, 17, 18, and - hopefully - 19.

When Angular 19 is published, I might drop support for Angular 16 and maybe even Angular 17. The current version add some new features, it's a pity not to be able to use them. But we're not there yet. Generally speaking, I try to support the last three to four Angular versions, so developers have two years to update.

rohan-gosavi commented 3 weeks ago

Hi Stephan,

I tried updating to latest version 21.3.6 but still highlightAll is not working.

Steps to reproduce: Search for a word in pdf and observe only current instance is highlighted and others are not. I have inspected the DOM, basically the term is not wrapped in the span.highlight. I tried toggling highlight all checkbox.

PS - Now i have downgraded to 20.5.2. image Not working on your demo page also image

Thanks

stephanrauh commented 3 weeks ago

Yes, that's correct - version 21.3.6 doesn't fix the bug. It seems diligent developers come back from their summer vacations and start flooding me with bug reports. So please apologize I can't fix every bug quickly.

However, if you don't want to downgrade to version 20, you can temporarily use the bleeding edge branch of pdf.js. When I confirmed you bug, I noticed the bug only shows on the stable bug.

stephanrauh commented 3 weeks ago

Your bug fix has landed with version 21.3.8.

Enjoy! Stephan

rohan-gosavi commented 2 weeks ago

Thanks Stephan for resolving this issue. I will take the latest version.