I ended up bailing on Adobe Acrobat here and going with FoxIt Reader (Free pdf reader) to do my pdf printing. This is the code I'm using to print via FoxIt in C#:
Process pdfProcess = new Process();
pdfProcess.StartInfo.FileName = @"C:\Program Files (x86)\Foxit Software\Foxit Reader\Foxit Reader.exe";
pdfProcess.StartInfo.Arguments = string.Format(@"-p {0}", fileNameToSave);
pdfProcess.Start();
The above code prints to the default printer but there are command line parameters you can use to specify file and printer. You can use the following syntax:
Foxit Reader.exe -t "pdf filename" "printer name"
Update:
Apparently earlier versions of acrobat do not have the problem outlined above either. If you use a much older version (4.x or something similar) it does not exhibit this problem.
Some printers do support native pdf printing as well so it's possible to send the raw pdf data to the printer and it might print it. See https://support.microsoft.com/en-us/kb/322091 for sending raw data to the printer.
Update 2
In later versions of our software we ended up using a paid product:
http://www.pdfprinting.net/
Thanks for the fantastic start to implementing this glaring feature omission from a mature product. An Autohotkey script will accomplish what you're looking for. I've created one below that will automatically save the tab layout when you close Acrobat.
This script works with the latest version of Acrobat Pro DC. In this version, the script menu options appear at the bottom of the "view" menu. If your version differs, you'll have to modify this script; please report in the comments if your Acrobat version puts the custom Javascript menu options elsewhere.
if WinActive("ahk_class #32770") & WinActive("Adobe Acrobat", "Do you want to close all tabs or the current tab") {
Send, !c
WinWaitActive, ahk_class AcrobatSDIWindow
Send, !v{Up 3}{Enter}
WinWaitActive, Warning: JavaScript, Tabs Saved
Send, {Space}
WinMenuSelectItem, ahk_class AcrobatSDIWindow, , View, Save Tabs
Send, ^q
}
Best Solution
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:
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.