Skip to main content
Participant
July 24, 2017
Question

VBA or JavaScript to perform a text search 2,000+ times

  • July 24, 2017
  • 2 replies
  • 990 views

Hi experts,

I need to search several PDFs containing a total of 40,000 pages for 2,000 account numbers.

Can this be automated using VBA or JavaScript or other? 

Which do you recommend and why? 

Thank you,

Peter

This topic has been closed for replies.

2 replies

Bernd Alheit
Community Expert
Community Expert
July 24, 2017

What should be the result of the search?

Participant
July 24, 2017

When using the Advanced Search feature, Acrobat returns the number of documents, number of instances and the name of documents that the search text was located in.

Bernd Alheit
Community Expert
Community Expert
July 24, 2017

You want make a screenshot for every account number?

try67
Community Expert
Community Expert
July 24, 2017

JavaScript: Out of the question. Acrobat can't handle that amount of information. I'm guessing the same applies for VBA as well.

I have developed a stand-alone application, written in Java, that can do it. If you're interested in such a tool feel free to contact me privately (try6767 at gmail.com) to discuss it further.

Participant
July 24, 2017

I have used the Acrobat "Full Text Index and Catalog" feature that allows me to create an index for my 40,000 pages.  Then using AutoIt, a keyboard & mouse replication tool, I read an account from Excel into the clipboard.  Then, using the advanced search feature in Acrobat, I am able to search the index for that account.  Adobe performs the search in about 1 second so this part is sufficient.  That part that is painfully slow is how I read the account numbers from Excel.

Is it possible to access the advanced search feature within Acrobat using VBA or JavaScript?  I'm a developer and have used VBA before; in the process of learning JavaScript; and haven't worked with Java in quite a while so would rather not go down that path but appreciate your offer.

Thanks,

Pete

lrosenth
Adobe Employee
Adobe Employee
July 24, 2017

No, it is not.