Skip to main content
April 20, 2017
Question

Highlight search term in pdf document

  • April 20, 2017
  • 2 replies
  • 1930 views

Hi,

We have java web application.

We have one functionality where users enter any string and result is pdf documents containing that string.

Our requirement is that when user opens pdf document that entered string will get highlighted but highlighting should not be saved permanently in pdf.

Please guide me how can I achieve this?

Thanks

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
May 24, 2017

Since you're using a Java application on the back-end you can have it execute another Java command to add actual highlights (ie, highlight annotations) to all the instances of the search term in your PDF file. It's not a simple task but it's much better than using the PDF Open Parameters, as those won't work in almost any environment, except if the file is opened inside a browser and using the Acrobat plugin.
Highlights should work almost anywhere, and it's even possible to flatten them, so they are just static content in the file.

May 24, 2017

Hi,

Please guide me how to achieve this.

Thanks

try67
Community Expert
Community Expert
May 24, 2017

As I wrote, it would require a stand-alone application that will take the original PDF and the search term as the input and output the new file. I've developed such a tool so feel free to contact me privately (try6767 at gmail.com) to discuss it further.

lrosenth
Adobe Employee
Adobe Employee
April 21, 2017

Read the “Open Parameters” technote for Acrobat – though this assumes user will have Acrobat or Reader installed and using a browser that supports it

May 23, 2017

Hi,

Thanks for your reply.

Users don't want to hit next to go to highlighted words.They want that word should get highlighted inside pdf when they open pdf file.

Please help me in this.

Thanks

Legend
May 23, 2017

The Open Parameters are all you have.