Hello,i added fpdf/fpdf by composer package to phpmaker 2021.
I use the code below to create pdfs.
public function rowCustomAction($action, $row)
{
use Fpdf/Fpdf;
$pdf = new FPDF();
$pdf->AddPage('L', 'A3');
$pdf->SetFont('Arial', 'BU', 14);
$pdf->Cell(400, 4, 'This is only test FPDF in Custom File', 0, 2, 'C');
$pdf->Output("Just_Test.pdf", "D");
return true;
}
but get this error: syntax error, unexpected ‘use’ (T_USE)How can I solve this? Thanks for your help
This PDF will now appear fine. However, only for the first row that I select in custom actions. How can I have this operation performed for the other rows as well?
thanks in advance for your help
You should use Custom Files if you want to output something into .pdf file. You may do anything from Custom Files, such as loop through recordset, create a custom layout for the .pdf file, and so forth.