This JavaScript sample lets you search and highlight text in PDF, DOCX, PPTX and XLSX documents by extracting text position (no servers or other external dependencies required). Note: To set the applied color as the default fill color for the Highlight Area tool, right-click on the highlighted area and select the "Set Appearance as Default Properties" option. Search & highlight text in documents using JavaScript. You may also import a text file containing search terms. Enter the words or phrases you wish to mark.
The Find and Highlight Phrases to Redact Window opens. Click the Options button next to Search and Remove Text 6.
In the "Display" tab, select the desired color for the highlight area using the "Fill Color" option. Select Find and Highlight Words and Phrases and click the Edit button.Text that matches the search terms will be highlighted: Additional options are available in the Find function: Click the red x. Enter search terms in the text box and press enter to search the active document.
#How to highlight words in pdf search how to#
Once the highlight is applied, right-click on the highlighted area. Click Find on the far right of the ribbon (or press Crtl+F) to enable the Find function. In this tutorial we will show you how to highlight words on search using JavaScript just like search engines highlight the matching word found in results whenever user entered on search box.