PrintPDFFile function example

Dear,
i’m trying to use the function PrintPDFFile but i can’t make it work, i’m not sure to understand how to setup the path.
can you give me an example of the PrintPDFFile function ?

thank you in advance,

Tristan Holemans

Do you want to use PrintPDFFile in PHP or Javascript?

Thank you for your reply.
In Php if possible but I ‘m also not sure to understand how I should input the Hescript function.

Thank you for your help.

You can begin with:
https://www.exeoutput.com/help/scripting/addscript/

Add this to the UserMain script:

procedure ExportPDF;
begin
PrintPDFFile("c:\my documents\mypdf.pdf");
end;

Then, invoke that ExportPDF procedure from PHP with:

<?php
exo_runhescriptcom ( "UserMain.ExportPDF");

as explained here:
https://www.exeoutput.com/help/scripting/callscript/

Thank for your reply,
i have error script when i input the hescript.

Try then:

procedure ExportPDF;
begin PrintPDFFile();
end;