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.


 


 

Comments (7)

  1. macbirdie says:

    "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’?"

    Nope, but sounds like a feature I’ve been wanting for some time now. Thanks anyway. 🙂

  2. irenake says:

    Do you have Adobe Reader installed on your box?

  3. macbirdie says:

    I don’t see a more reliable way to view PDF content on a Windows PC, and it’s 7.0.5. 🙂

  4. srinivas says:

    stopped using adobe for pdf from time i discovered the foxitreader .let me check if d same string works in that .

    thx

  5. dmurillo says:

    I also don’t see the search panel.  I’m using Adobe Reader 7.0.8 on XP SP2.

  6. irenake says:

    Do you get the .pdf opened in the browser, or does it open the Adobe Reader as a stand alone app using AcroRd32.exe?  

    http://www.adobe.com/support/techdocs/331025.html

  7. SPSwampOfMisery says:

    Thank you Thank you Thank you! I have been trying to figure out how to do this for the past week now. This solved a huge headache for me!

Skip to main content