evosys21/pdflib
PHP addons for FPDF/TCPDF/tFPDF to build advanced tag-formatted multicells and tables. Supports alignment/justification, mixed fonts/styles/colors, padding, frames/backgrounds, links, tabs, and sub/superscripts for rich PDF layouts.
barryvdh/laravel-dompdf alternatives). The MIT license and lack of dependents suggest low coupling risk.spatie/laravel-pdf or mike42/laravel-export for hybrid PDF/Excel outputs, though no direct integration exists.FPDF::Cell()/TCPDF::MultiCell() with fluent methods (e.g., $pdf->multicell()->align('C')->underline()), requiring <20 lines of refactoring per template.PDF::loadView() remains intact).dompdf or snappy (HTML-to-PDF) by targeting server-side PDF generation directly.memory_get_usage()).Disable PageBrake feature (v1.1.0) may interact unpredictably with Laravel’s pagination systems (e.g., Illuminate\Pagination).AddFont()) must be pre-loaded; the package doesn’t auto-detect system fonts.microtime(true).PDF::table()->addRow()) for Laravel apps?FPDF/TCPDF code be auto-refactored (e.g., via PHPStan rules) or requires manual updates?dompdf with HTML/CSS).knplabs/knp-snappy).pdf-lib).resources/views/pdf/*.blade.php) for:
FPDF::Cell() calls → High priority for refactoring.SetFont('Arial', 'B')) → Medium priority.AdvancedTable.FPDF/TCPDF instantiation with EvoSys21\PdfLib\Tcpdf\Pdf (or Fpdf\Pdf).
// Before
$pdf = new \TCPDF();
// After
$pdf = new \EvoSys21\PdfLib\Tcpdf\Pdf();
InvoicePdf) using the examples as a guide.composer.json:
"require": {
"evosys21/pdflib": "^1.2.0"
}
MultiCell() calls with the package’s methods (e.g., $pdf->multicell()->text('...')).barryvdh/laravel-dompdf (different use cases), but avoid mixing in the same template.spatie/laravel-pdf for hybrid outputs (e.g., PDF + Excel).Rollback Plan: Maintain a feature flag (e.g., config('pdf.use_pdflib')) to toggle between old and new libraries during migration.
$pdf->table()->addRow()) cut maintenance time for PDF templates.Disable PageBrake).AddFont()).PDF::generate() in background jobs).file_put_contents(storage_path('app/pdf/cache.pdf'))) to reduce load.| Failure Scenario | Impact | Mitigation | |------------------------------------|
How can I help you explore Laravel packages today?