Do you support PDFlib with PHP?
Ce contenu n’est pas encore disponible dans votre langue.
No. PDFlib is not available on Ruachost hosting.
PDFlib is a commercial, third-party product that needs its own licence and a special PHP extension, so it isn’t installed on our servers.
Free alternatives
Section titled “Free alternatives”You can create PDF files from PHP with free libraries that don’t need a server extension. Install them in your project with Composer:
| Library | Good for | Install command |
|---|---|---|
| Dompdf | Turning HTML and CSS into a PDF | composer require dompdf/dompdf |
| TCPDF | Detailed layouts, barcodes, many languages | composer require tecnickcom/tcpdf |
| FPDF | Simple, lightweight PDFs | composer require setasign/fpdf |
A short Dompdf example:
<?phprequire 'vendor/autoload.php';use Dompdf\Dompdf;
$dompdf = new Dompdf();$dompdf->loadHtml('<h1>Invoice</h1><p>Thank you for your order.</p>');$dompdf->render();$dompdf->stream('invoice.pdf');Related articles
Section titled “Related articles”Cette page vous a-t-elle aidé ?
Merci pour votre retour.