I suspect this may apply to multiple programming languages, but in this context I am referring to .NET.
When I use System.Diagnostics.Process.Start
, I can include, as an argument, a System.Diagnostics.ProcessStartInfo
object. One of the properties of ProcessStartInfo class is Verb
(type of string). There is also a string[] property of Verbs
which seems to contain the list of permitted values for Verb
.
I notice that within the Verbs
array there is a value for "Print" and a value for "PrintTo". What's the difference between the two? I tested both and they both seem to cause the file to print to my default printer.
According to this MSDN article, PrintTo is basically present to support drag-and-drop operations for printing (dragging a document over a printer icon, for example). It sounds like it's probably not meant to be used by your code.
The printto verb is normally used when the user drags a file and drops it on a printer shortcut. You need to supply at least two arguments, the first one is the file you want to get printed, the second one is the printer name. Registry entries on my machine use additional arguments but it is quite unclear to me what they may be.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With