Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the parameters for "printto" using shellexecute?

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)

like image 827
Peter Turner Avatar asked Jun 05 '12 13:06

Peter Turner


1 Answers

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
);
like image 83
David Heffernan Avatar answered Sep 21 '22 15:09

David Heffernan