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;

Hello, I want to know where is the file stored? Can I move or store it directly in custom directory o next to exe?

Thank you

PrintPDFFile is buggy. It is fixed in the incoming version of ExeOutput.

in print option
how to set copies, margin, paper size, print background graphics
using command like js or php code

Hi, I didn’t try the PrintPDFFile with ExeOutput but rather HTML2PDF which does the job just as well if you are used to it.

These options cannot be set programmatically yet, but it should be in a future CEF release.