• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

search form

Explorer ,
Jan 04, 2018 Jan 04, 2018

Copy link to clipboard

Copied

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?

TOPICS
Acrobat SDK and JavaScript , Windows

Views

408

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 04, 2018 Jan 04, 2018

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.

Votes

Translate

Translate
Community Expert ,
Jan 04, 2018 Jan 04, 2018

Copy link to clipboard

Copied

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.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 04, 2018 Jan 04, 2018

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 04, 2018 Jan 04, 2018

Copy link to clipboard

Copied

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?

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 05, 2018 Jan 05, 2018

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines