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

custom search with javascript?

Explorer ,
Oct 19, 2017 Oct 19, 2017

Hi I want to do a search in a pdf file, I want to look for a name and then to perform the search I pull an ordered list of all the times that name appears. I did it with advanced search but the list is very confusing ... is there any code to do this?

TOPICS
Acrobat SDK and JavaScript
393
Translate
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 ,
Oct 19, 2017 Oct 19, 2017

Yes, but if the name is more than one word long it gets complicated.

Basically, you would need to create a loop over all the words in all the pages of the file, using the getPageNthWord method of the Document object, searching for the word(s) you're interested in. Also, this is quite a memory-intensive process and the application tends to choke if your file is very long.

Translate
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 ,
Oct 19, 2017 Oct 19, 2017

ok thanks a lot and can you generate a custom dialog box to perform a search? where say say the name and name and there the user put the name you want to search and get the reusltado in a list?

Translate
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 ,
Oct 19, 2017 Oct 19, 2017

It's possible, but quite complicated to implement.

Translate
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 ,
Oct 19, 2017 Oct 19, 2017

el codigo es muy complejo? usted lo hace?

Translate
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 ,
Oct 19, 2017 Oct 19, 2017
LATEST

I could, yes. Contact me privately to discuss it further (including the

price) at try6767 at gmail.com.

Translate
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