Where to use --> sc_pdf_output([path].'/'.[file_name].'.pdf',"F");

Hi all,

  1. I need to save the pdf generated and I got the sc_pdf_output([path].’/’.[file_name].’.pdf’,“F”); to use.
    Where have I to insert it ? Header, Body, Footer ??? Into event seems to give me a error.

  2. Is it possible do not show the popup which ask if Open or Save the PDF generated ? If I set PDF Destination to Server what happens ?
    sc_pdf_output([path].’/’.[file_name].’.pdf’,“F”); writes the file on a server folder ?

  3. If the report is a multipage how can I control how many lines for page ?

Thanks

Image of report produced

report.png

For the moment I use within Pdf Report : PDF Destination —> Server and PDF path --> Name of File (under same folder) or path/filename

Is it possible to change the destination path on runtime?

suggestion: inside the pdf app, (in the code section, so you couldn’t use the graphic layout) you can use: $pdf->output(“file_name.pdf”,“F”); to create the same document but with the path+name defined

I don’t know if this can help you:
I send * pdf files by mail.
At the end of the code where I generate a pdf using tcpdf, I include the following code:

$at_path=$this->Ini->path_doc;
$doc_name = {location_name}."-".{report_number};

$pdf->Output($at_path."-".$doc_name.’.pdf’, ‘F’);

m_sendMail_phpmailer([g_id]);

unlink($at_path."-".$doc_name.'.pdf');  // ** Delete file on server

I generate a pdf file on the server, send it and then delete it immediately because I don’t need it.