I'm running into a similar issue, did you ever come across a solution?
Dec 31, 2017
6
Level 1
Using FPDF in Laravel 5.5?
Hi, I'm trying to use FPDF in my project, I use setasign/fpdf from Git, but every time when I try to open it, it shows tons of unknown data.
Here is my code:
$pdf = new \setasign\Fpdi\Fpdi();
$pdf->AddPage();
$pdf->setSourceFile('dokumenti/garancija.pdf');
$tplIdx = $pdf->importPage(1);
// use the imported page and place it at position 10,10 with a width of 100 mm
$pdf->useTemplate($tplIdx, 5, 5, 205);
// now write some text above the imported page
$pdf->SetFont('Times');
$pdf->SetTextColor(0, 0, 0);
$pdf->SetXY(25, 75);
$pdf->Write(0, 'Test');
$pdf->SetXY(25, 80);
$pdf->Write(0, 'Test');
$pdf->SetXY(19, 55);
$pdf->Write(0, 'Test');
$pdf->Output();
Please or to participate in this conversation.