Hi i'm trying to use the following code to create a pdf from scratch and run it in a procedure.
For various reason i'm not able to use the default report builder..
So the following code works properly locally on the server with php script, but in a procedure it does not..
It opens an empty page and nothing else.
I'd try tcpdf but it seems more complex and i'm not able to make it work .. like this piece of code..
<?php
require('core/libs/fpdf/fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output();
$filename="pdfsource/test2.pdf";
$pdf->Output('F',$filename);
?>
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
fpdf procedure not working download Topic is solved
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: fpdf procedure not working download
Hi,
Remove the PHP tags and update the require line as follows:
Remove the PHP tags and update the require line as follows:
Code: Select all
require('libs/fpdf/fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output();
$filename="pdfsource/test2.pdf";
$pdf->Output('F',$filename);