ulrichb
ulrichb

Reputation: 20044

Adobe Reader Command Line Reference

Is there any official command line (switches) reference for the different versions of
Adobe (formerly Acrobat) Reader?

I didn't find anything on Adobe Developer Connection.

Especially I want to:

Upvotes: 108

Views: 407776

Answers (7)

K J
K J

Reputation: 11733

The most accessible source of the /A and URL.pdf# command line switches is the 2007 version 8 copy currently available from

https://pdfobject.com/pdf/pdf_open_parameters_acro8.pdf or https://web.archive.org/web/20210413084849/https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf

It was rebadged as Edition 1.0 for DC in 2015, But content appears unchanged, however you can get a copy at present from https://corpora.tika.apache.org/base/docs/bug_trackers/pdf.js/pdf.js-LINK-2843-0.pdf

The was no "close reader" command but its possible to use a wrapper function to kill task, however its better to invoke clean close F4 via send keys, as per other answers. Here is latest source of Command Line Switches

How do I use the Windows command line?

This Link below, as described above using #page=52, works in FireFox HOWEVER ironically in Acrobat enabled Edge this does NOT ALWAYS function for me !!

https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/pdfs/acrobatsdk_overview.pdf#page=52

Upvotes: 2

Aliaksandr Shpak
Aliaksandr Shpak

Reputation: 392

ExternalViewers for sumatrapdfreader

[ CommandLine = "C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe" /A "page=%p" "%1" Name = Acrobat DC Filter = *.pdf ]

Upvotes: 0

Ian Finlay
Ian Finlay

Reputation: 119

Having /A without additional parameters other than the filename didn't work for me, but the following code worked fine with /n

string sfile = @".\help\delta-pqca-400-100-300-fc4-user-manual.pdf";
Process myProcess = new Process();
myProcess.StartInfo.FileName = "AcroRd32.exe"; 
myProcess.StartInfo.Arguments = " /n " + "\"" + sfile + "\"";
myProcess.Start();

Upvotes: 0

David Webb
David Webb

Reputation: 193686

You can find something about this in the Adobe Developer FAQ. (It's a PDF document rather than a web page, which I guess is unsurprising in this particular case.)

The FAQ notes that the use of the command line switches is unsupported.

To open a file it's:

AcroRd32.exe <filename>

The following switches are available:

  • /n - Launch a new instance of Reader even if one is already open
  • /s - Don't show the splash screen
  • /o - Don't show the open file dialog
  • /h - Open as a minimized window
  • /p <filename> - Open and go straight to the print dialog
  • /t <filename> <printername> <drivername> <portname> - Print the file the specified printer.

Upvotes: 144

user2810308
user2810308

Reputation: 27

Call this after the print job has returned:

oShell.AppActivate "Adobe Reader"
oShell.SendKeys "%FX"

Upvotes: 1

TheLukeMcCarthy
TheLukeMcCarthy

Reputation: 2283

To open a PDF at page 100 the follow works

<path to Adobe Reader> /A "page=100" "<Path To PDF file>"

If you require more than one argument separate them with &

I use the following in a batch file to open the book I'm reading to the page I was up to.

C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe /A "page=149&pagemode=none" "D:\books\MCTS(70-562) ASP.Net 3.5 Development.pdf"

The best list of command line args for Adobe Reader I have found is here.
http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf

It's for version 7 but all the arguments I tried worked.

As for closing the file, I think you will need to use the SDK, or if you are opening the file from code you could close the file from code once you have finished with it.

Upvotes: 18

Josh
Josh

Reputation:

I found this:

http://www.robvanderwoude.com/commandlineswitches.php#Acrobat

Open a PDF file with navigation pane active, zoom out to 50%, and search for and highlight the word "batch":

AcroRd32.exe /A "zoom=50&navpanes=1=OpenActions&search=batch" PdfFile

Upvotes: 20

Related Questions