<?php define('FPDF_FONTPATH', '.'); require '../src/fpdf/FPDF.php'; $pdf = new \fpdf\FPDF(); $pdf->AddFont('Calligrapher', '', 'calligra.php'); $pdf->AddPage(); $pdf->SetFont('Calligrapher', '', 35); $pdf->Cell(0, 10, 'Enjoy new fonts with FPDF!'); $pdf->Output();
<?php require '../src/fpdf/FPDF.php'; $pdf = new \fpdf\FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 16); $pdf->Cell(40, 10, 'Hello World!'); $pdf->Output();