I have loaded my pdf using barteksc pdfviewer. I want to add the search and highlight results functionality into my pdf. When the user clicks in the search icon, the code will start to search for the query in each page and add Highlight Annotations in each page around the word using PDFBox. Inspired by highlight text using pdfbox when it's location in the pdf is known
But now after adding annotations, I am not able to display it on my current pdf. All annotations have been added to the list, but not displayed on screen. I dont want to save a new pdf and open it. I want the changes to come in the existing pdf, when the user searches for a query, the results must come higlighted.
How to solve this?
I tried to view the PDF from assets using barteksc library. And imported tom_roush android port of pdfbox for stripping pdftext highlighting. how to integrate the page annotations into the pdfviewer so that the changes can be seen?