I want to print a pdf document in DUPLEX mode by command prompt.Already tried with /p and /t. Print from windows command line to network. Sumatra PDF from Print from command line.
I am able to print pdf files from my Visual Basic 2010 code using the command line arguments technique: Dim printChart As New Process() With printChart.StartInfo.UseShellExecute = True.StartInfo.WindowStyle = ProcessWindowStyle.Minimized.StartInfo.CreateNoWindow = True.StartInfo.FileName = pdfExecutable.StartInfo.Arguments = '/print:printer=' & printerToUse & Chr(34) & ' ' & Chr(34) & pdfFilename & Chr(34).Start().WaitForExit().Close() End With Trouble is, there is no way to manipulate the printer settings using this technique. I'm looking for a way to print the documents in duplex mode.
Can anyone suggest an approach.
You can find something about this in the. (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 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 - Open and go straight to the print dialog • /t - Print the file the specified printer. Vicky Cristina Barcelona Blu Ray.
To open a PDF at page 100 the follow works /A 'page=100' ' 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.
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.
Comments are closed.