104

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:

  • Start Reader and open a file
  • Open a file at a specific position (page)
  • Close Reader (or single file)
ulrichb
  • 19,610
  • 8
  • 73
  • 87
  • 1
    You can also save inside the PDF document itself, at which page a viewer should open it. With this the PDF document always open at that page, independent which PDF viewer you use. – PatrickF Sep 20 '18 at 10:15

7 Answers7

140

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.
Christian Ammer
  • 7,464
  • 6
  • 51
  • 108
David Webb
  • 190,537
  • 57
  • 313
  • 299
  • 7
    The path seems to have changed. A google search turned up the following two versions http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/Acrobat_SDK_developer_faq.pdf and http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/intro_to_sdk/DeveloperFAQ.pdf – user288299 Dec 18 '10 at 12:10
  • 4
    After printing from command line, adobe will leave aleast one window open which can hang your script. open a non related pdf or adobe window. This will keep your script running – Pete Brumm Aug 07 '12 at 12:43
  • There are a ton of other executables in that directory. Do any of those have the ability to import XML data into an FDF file? – Nicholas DiPiazza Mar 20 '13 at 20:35
  • 3
    For the /t switch, and are not mandatory. If they're omitted, the printer will just use the default. – stharward Sep 12 '14 at 13:17
  • 1
    having the directory in `%path%` and aliasing default options with `doskey acrord32=acrord32 /n /s /o /a navpanes=0&zoom=100&page=1` is the only way to keep using *reader* for me –  Nov 25 '14 at 04:41
  • From cygwin, you can use `acrord32 & for i in *.pdf; do acrord32 $i; done` to open all the PDFs in the current directory. I also alias acrord32, but just as an alternative to adding it to the path. – Josiah Yoder Jan 12 '16 at 15:28
  • Hi, do you know how to change the /t command to print to file instead of printer? cannot find correct syntax in any of the adobe documentation. @JosiahYoder – El_1988 Dec 02 '18 at 13:38
  • @El_1988 Sorry, I don't know. – Josiah Yoder Dec 13 '18 at 21:04
  • 1
    Looks like Latest version of Acrobat does not support parameters anymore. – Anton Prokofiev May 29 '20 at 10:55
  • @AntonProkofiev Why do you think that and which version of Reader are you referring to? The above commands still work for my Reader DC 2020.0009.20067. – Thorsten Schöning Jul 07 '20 at 10:30
  • @ThorstenSchöning Sorry my fault!. I missed space between last parameter and file name. In my script: was AcroRd32.exe /t /n /h /o /sFileName (no space betrween /s and FileName) this is working in AdobeReader X (version 10.1.16) , but not in Adobe Reader DC (version 2020.04.20074). – Anton Prokofiev Jul 08 '20 at 13:20
  • 1
    The actual document with the list of parms, c2015, is named this "AcrobatDC_pdf_open_parameters.pdf" - as of May 2021 - and it gets moved around when Adobe rearranges their sites. – charles ross May 13 '21 at 15:39
  • I know this is comment abuse, but @charlesross thank you! – a different ben Nov 29 '21 at 09:54
20

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
17

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.

TheLukeMcCarthy
  • 2,253
  • 2
  • 25
  • 34
2

Call this after the print job has returned:

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

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();
Ian Finlay
  • 121
  • 2
  • 9
1

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

K J
  • 8,045
  • 3
  • 14
  • 36
0

ExternalViewers for sumatrapdfreader

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