I am creating a page to show pdf and I used pdf.js project of Mozilla to render pdf.
pdf.js is making multiple dynamic divs of rendered text under canvas tag. I want to highlight some text of my pdf. Following is the code generated dynamically by pdf.js:
<div id="pageContainer1" class="page" style="width: 741.8181818181818px; height: 959.9999999999999px; " data-loaded="true">
<canvas id="page1" width="741" height="959"></canvas>
<div class="textLayer">
<div data-canvas-width="300.69542660606743" data-font-name="Times" style="font-size:12.06334818181817px; left: 173.1905882352941px; top: 8.593899292929294px; -webkit-transform: scale(0.9002857084013994, 1); -webkit-transform-origin-x: 0%; -webkit-transform-origin-y: 0%; " dir="ltr" data-text-length="58">Boston University Computer Science Technical Report No. 20</div>
</div>
</div>
Can any one provide me a way to highlight the text from above code with Javascript (if possible)?