Reputation: 21
I am trying to achieve something like below.
I want the list of matching text should be listed in right side bar. I am sure it can be done using PDFTron but I am looking for alternatives.
Is it possible to implement using ng2-pdf-viewer?
Any help would be much appreciated.
Upvotes: 1
Views: 1134
Reputation: 11941
Potentially its doable with any reader including ng2. So here using ng2 searching the word "pdf" we can see them all highlighted and jump to the next one found, but then converting those to sidebar entries would not be very useful.
Most simpler PDF viewers will jump to the first matching entry in a find box and may not even highlight the second match.
So ng2 is more advanced at that level, however building a full sidebar display is usually top end territory, since the replacement of other screen real estate needs more management. Over use of tabbed user interfaces can often be slower and /or counter productive.
For react users there is a suitable solution at https://react-pdf-viewer.dev/examples/show-search-results-in-the-sidebar-of-the-default-layout/
Upvotes: 0