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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style