custom search with javascript?

Explorer ,
Oct 19, 2017

Copy link to clipboard

Copied

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

Views

109

Likes

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

custom search with javascript?

Explorer ,
Oct 19, 2017

Copy link to clipboard

Copied

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

Views

110

Likes

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
Oct 19, 2017 0
Most Valuable Participant ,
Oct 19, 2017

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Oct 19, 2017 0
Explorer ,
Oct 19, 2017

Copy link to clipboard

Copied

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?

Likes

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
Reply
Loading...
Oct 19, 2017 0
Most Valuable Participant ,
Oct 19, 2017

Copy link to clipboard

Copied

It's possible, but quite complicated to implement.

Likes

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
Reply
Loading...
Oct 19, 2017 0
Explorer ,
Oct 19, 2017

Copy link to clipboard

Copied

el codigo es muy complejo? usted lo hace?

Likes

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
Reply
Loading...
Oct 19, 2017 0
try67 LATEST
Most Valuable Participant ,
Oct 19, 2017

Copy link to clipboard

Copied

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

price) at try6767 at gmail.com.

Likes

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
Reply
Loading...
Oct 19, 2017 0