I'm using Delphi's winapi ShellExecute to try to print to a user selected printer and not the default printer. I'm trying to figure out the syntax for a command using the printto verb.
What would an example shell execute statement look like if I wanted to print manual.pdf to a HP Laser Jet 4 with IP address 192.168.1.49?
(this is just an example, but if you can help me out, I can take it from there)
You need to pass the network network address of the printer in the arguments parameter.
ShellExecute(
WindowHandle,
'printto',
PChar(DocumentName),
PChar(PrinterNetworkAddress),
nil,
SW_HIDE
);
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