What are some alternatives to PDFlib for creating and manipulating PDFs in PHP?

PDFlib is a popular library for creating and manipulating PDFs in PHP, but it can be costly for some users. Fortunately, there are alternative libraries available that can achieve similar functionality for free or at a lower cost. Some alternatives to PDFlib include TCPDF, FPDF, and mPDF.

// Example using TCPDF to create a PDF file
require_once('tcpdf/tcpdf.php');

$pdf = new TCPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->Cell(0, 10, 'Hello World!', 0, 1, 'C');
$pdf->Output('example.pdf', 'I');