Printing an external document from 4D

Hi all,

I would like to automatically print external document (specifically a PDF) from within 4D on Windows. The process would be:

  1. Find the PDF to print (I know the name and location of this doc programmatically)
  2. Open the PDF in Acrobat Reader
  3. Tell reader to print the PDF
  4. Close the document

This should all be done without user intervention, and I have no need to display the document within 4D- I just want 4D to print the document.

It seems like Launch External Process would be the way to do this, but I’m unfamiliar with exactly what I should be passing as parameters to do this.

Any help appreciated,

Thanks!

Doug,

On Windows, I use the plugin https://github.com/OrchardSoftware/4D-Win32APIWin32api> :

<code 4D>
$Texte_error:=sys_ShellExecute (“print”;$T_Toprint;"";"";SW_HIDE)
</code 4D>

Thank you Bertrand, I will check this out.

DKC