'Printing PDF to PageSize using command by invoking Windows Process - C#
I am trying to Print PDF file using shell commands of Windows Process like this:
Process p = new Process();
p.StartInfo = new ProcessStartInfo()
{
CreateNoWindow = true,
Verb = "print",
Arguments = String.Format("/h /t \"{0}\" \"{1}\"", "MyFile.pdf", "My Printer Name")
};
p.Start();
I needs to change the page size (A4 to Envelope C5) of my default printer. I am wondering a way I can pass a command to change page size of printer. Using this Process Arguments:
Arguments = String.Format("/h /t \"{0}\" \"{1}\"", "MyFile.pdf", "My Printer Name")
Is there any command that I pass to this arguments like /PageSize "Envalope C5" ? Any help would be really appreciated!
PS: Above process code triggers my Adobe Acrobat Reader DC to print the PDF file.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
