I want to print a PDF from Delphi directly (Version 6.0, I know it's old stuff, but they use it here...).
So far I used the following command:
printCommand := 'print';
printerInfo := '';
ShellExecute(Application.Handle, PChar(printCommand),
PChar(documentToPrint), PChar(printerInfo), nil, SW_HIDE);
But the problem is, that Adobe always opens when doing this (not opening the PDF, but just appearing as "empty").
I do not want to open Adobe, because then the operator always has to close the Reader then. It would also be OK if Adobe Reader closes after printing. I do not want to invoke Adobe Reader directly, because if path, name or PDF software changes it should still work! So it would be good if I can use win standard program. So the same should work if for example Ghost Reader is installed as default PDF software. But as said it should not open or at least close after printing job.
I also want to avoid to create a new process and then terminate or things like that.