4 Replies Latest reply on Jan 5, 2018 3:38 AM by DEM

    search form

    DEM Level 1

      hello I have a pdf with more than 1000 pages which is a "table of contents" which has links to .pdf files ... on the first page I want to have a page that is a search page (image 1) ... ..ahi be able to search for any of the two options and when the search is done, show the result of all matches and click on any option take me to the page of the "table of contents" "where you are and from there to the .pdf file.

      Could it be done?

        • 1. Re: search form
          Thom Parker Adobe Community Professional

          There are a couple of ways you could implement this.


          1. Search the text on all pages for matches. Very Slow to do this in real time.


          2. Write a script that collects all the search data up front and places it somewhere such as a document script or form field. This will significantly speed up the search.


          3. Write a script to create a bookmark for each of the entries in the TOC. This is similar to #2, but makes the navigation bit easier.

          • 2. Re: search form
            DEM Level 1

            thank you very much for your response, there is some link for some reference as it is not programming or anything from javascript thank you very much

            • 3. Re: search form
              Thom Parker Adobe Community Professional

              Here's the Acrobat JavaScript reference. This link is for the "doc.getPageNthWord()" function which is what you use to search content text on a PDF page. 

              Acrobat DC SDK Documentation


              However, the complete script you'll need is complicated and will require some effort.


              On the other hand, Acrobat, and just about every other PDF viewer, has a pretty good built-in search feature.  Have you tried it out as a possible solution?

              • 4. Re: search form
                DEM Level 1

                hello, if I try it but when it shows me the results in the function "advanced search" is very confusing, that's why I wanted something clearer ... I'll search in google some javascript tutorial to be able to thank you very much for your help