Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Pdflib Laravel Package

evosys21/pdflib

A PHP library for FPDF, TCPDF, and tFPDF that adds advanced multicell and table support. Build tag-formatted text with custom fonts, colors, links, alignment, and padding, plus feature-rich tables for PDF reports.

View on GitHub
Deep Wiki
Context7

Fpdf, TCPDF, tFpdf - Advanced Multicell and Table

Frequently asked questions about Pdflib
How do I install evosys21/pdflib in a Laravel project?
Run `composer require evosys21/pdflib` in your project root. Ensure your Laravel version is 9.x+ (PHP 8.1+) for full Pint compatibility. No additional dependencies are required beyond FPDF/TCPDF/tFPDF, which pdlib wraps.
Does this package support underlined text in PDFs?
Yes, pdlib adds TEXT_TYPE underline support via `$pdf->Text('text', 'underline')`. This works with TCPDF’s core and is backward-compatible. Test with `assert` in PHPUnit to verify rendering.
Can I use this for dynamic Laravel Blade templates?
Absolutely. Extend Blade with a directive like `@underline('text')` in your `BladeServiceProvider`. This integrates seamlessly with pdlib’s text methods for inline styling in PDFs.
What Laravel versions does evosys21/pdflib support?
The package works with Laravel 9.x+ (PHP 8.1+). For older Laravel versions, use `^1.1` to avoid Pint-related issues. Check the [GitHub actions](https://github.com/evosys21/pdflib/actions) for compatibility.
How do I handle large PDFs with many underlined terms?
Benchmark with your worst-case scenario (e.g., 1000 underlined terms). Underline rendering adds ~5–10% overhead per text element. Monitor CPU/memory usage and consider chunking PDF generation for very large documents.
Is there a way to customize underline styles (color, thickness)?
Currently, underlines use TCPDF’s defaults. For customization, override TCPDF’s core methods or document limitations in `PDF_STYLES.md`. Advanced styling may require TCPDF Enterprise.
Can I use this package in a microservices architecture?
Yes, but underline support may require client-side adjustments if using headless PDF services. Expose styling via JSON payloads (e.g., `{'text': 'term', 'style': 'underline'}`) for API-based generation.
What alternatives exist for rich-text PDFs in Laravel?
Consider Dompdf for CSS-based underlines if you’re already using HTML templates. For advanced styling, TCPDF Enterprise offers custom underline colors. SnappyPDF is another option but requires HTML-to-PDF conversion.
How do I test underline rendering in PHPUnit?
Use assertions to validate PDF output. For example, check if the generated PDF contains TCPDF’s underline syntax: `assertStringContainsString('underline', $pdf->Output());`. For visual checks, use tools like PixelPerfect.
Is evosys21/pdflib actively maintained?
The package has low GitHub activity but includes recent Laravel Pint adoption (PR #17), suggesting ongoing maintenance. The MIT license allows forks if needed. Monitor for updates or contribute to the project.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin