SYSK 235: Display .pdf Document Search Results Programmatically

Say, you’ve got a bunch of read-only documents in .pdf format that you allow your web site users to view. And what you’d like to do is to create links that jump to certain sections of the document, but without making any changes to the original document. For example, may be you want to locate and link to any paragraph that references words “customer rights”.

 

Click on the following link to see what I mean:

http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf#search=%22search%22

 

Did you see the search panel on the right hand side, which allowed you to view all occurrences of the word(s) we searched for, in this case, the word ‘search’?

 

So, all you have to do is append

#search=%22Your%20Search%20Criteria%20Here%22

query string parameter to the end of your URL pointing to a PDF document.

 

To search for word1 OR word2, separate them by a space ( %20 ).

To search for a phrase, add extra double quotes ( %22 ) around the phrase.