Posted by webmaster Guido on June 08, 2004
: Hey guys, I've been given a million different examples of how shell execute should be run.
: Can someone tell me what the most simple way would be to PRINT a PDF file from ShellExecute?
In your Delphi application, use the same code as for printing any other "registered" document type. Registered: if the extension is known by Windows, so that it can send it to its native application. Example:
ShellExecute(Handle, 'print', PChar('c:\test\test.pdf'), nil, nil, SW_SHOW)
This will work if there is an application on the system that can print .PDF files, such as Acrobat Reader.
Search for: shellexecute