Skip to main content
Participant
June 12, 2021
Question

Open PDF including search term - goto first search result (command line?)

  • June 12, 2021
  • 1 reply
  • 2600 views

How can I open a given PDF file while starting a search for a certain string within the file?

 

I have to check several invoices which came just together in one container file. Moreover, I have an Excel file (XLSX) listing all relevant invoice numbers.

 

From the Excel file I can perform task like "open pdf" oder "run acrobat". However, I do not know how I can tell Acrobat not only to open my container PDF but also start searching a given invoice number whithin this PDF (it is very time consuming re-entering all relevant invoice numbers into the search dialog of Acrobat).

 

I could not find any command line switches for opening a PDF with Acrobat.exe while performing a search. And I am not familiar with the capabilities of scripting whithin Acrobat.

 

Therefore I would be glad to get help on how to "link" the PDF to my XLSX - whithout re-entering the invoice numbers.

 

Kind regards.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
June 12, 2021

You can't quite do that, but you can do something similar. You can cause the Advanced Search window to open and search for a specific string when opening the file. From the results you could then jump to the location of the first match, by manually double-clicking it.

To do it execute the following command (through Shell, for example):

 

"<Path to Acrobat.exe on your machine>" /A "search=<Search term>" "<Path to the PDF file>"

Participant
June 12, 2021

Thank You very much!

 

This is what I was looking for and Your hint works for me! Thus I can avoid retyping the invoice numbers within the Acrobat search.

 

By the way: Where did You find the "/A search" start parameter for Acrobat.exe? Is there any document available? I tried a search myself but found nothing...

 

Kind regards.

try67
Community Expert
Community Expert
June 12, 2021