Freigeben über


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

  • Anonymous
    November 07, 2006
    "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. :)

  • Anonymous
    November 07, 2006
    The comment has been removed

  • Anonymous
    November 07, 2006
    I don't see a more reliable way to view PDF content on a Windows PC, and it's 7.0.5. :)

  • Anonymous
    November 07, 2006
    stopped using adobe for pdf from time i discovered the foxitreader .let me check if d same string works in that . thx

  • Anonymous
    November 07, 2006
    I also don't see the search panel.  I'm using Adobe Reader 7.0.8 on XP SP2.

  • Anonymous
    November 07, 2006
    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

  • Anonymous
    October 05, 2009
    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!