问题
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)
回答1:
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.
回答2:
Also found this pdf reference:
http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdf
回答3:
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
回答4:
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.
回答5:
Call this after the print job has returned:
oShell.AppActivate "Adobe Reader"
oShell.SendKeys "%FX"
来源:https://stackoverflow.com/questions/619158/adobe-reader-command-line-reference