Weave Code
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

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.

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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky