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

Fpdf Bundle Laravel Package

mayeco/fpdf-bundle

mayeco/fpdf-bundle is a Symfony bundle that integrates the FPDF PHP library, exposing it as a service and handling configuration so applications can generate PDF documents from controllers or templates with minimal setup.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — misaligned by framework, not by domain. For a TPM, the first fact to internalize is that mayeco/fpdf-bundle is a Symfony bundle, not a Laravel package. Its entire contribution is dependency-injection wiring: it registers the vendored FPDF 1.7 class with a Symfony container. Laravel has no bundle system (it has service providers), so that wiring is unreachable. In a Laravel codebase you would be adopting a dead wrapper to obtain an underlying library that is freely and better available as setasign/fpdf. The useful part (FPDF) and the packaged part (Symfony glue) are separable, and only the useful part survives in Laravel.

Integration feasibility — the gate is Composer, and it likely fails. The package targets Symfony 2.x-era constraints; Laravel 10/11 ship Symfony 6/7 components, so a composer require will probably hard-conflict. The underlying FPDF 1.7 dates to ~2011 and predates PHP 8. Workarounds (forking, loosening constraints, --ignore-platform-reqs) exist but exchange a 50-line saving for a permanent fork-maintenance liability. That is a poor trade for any product with a multi-year horizon.

Technical risk — high, and concentrated in the transitive library.

Risk Severity TPM framing
Composer conflict on modern Laravel High Blocks install; empirically testable in a half-day spike
FPDF 1.7 vs PHP 8.2+ High Removed functions, dynamic-property deprecations; no upstream maintainer to patch
UTF-8 / non-Latin text High Latin-1 only; non-ASCII names/addresses/currency require manual conversion — silent corruption risk
Unmaintained upstream High 2 stars, 0 dependents: no downstream bug surface, so breakage surfaces in your production
License/attribution Medium Repo MIT covers glue only; FPDF has its own terms — Legal must confirm for customer-facing PDFs
Framework coupling Medium No supported Laravel registration path

Key questions to resolve before committing budget

  1. What is the document mix — are non-ASCII names, addresses, or currency symbols present? If yes, FPDF 1.7 is disqualified.
  2. Is HTML/CSS templating required? FPDF is a coordinate-drawing API, the wrong family entirely if templating fidelity matters.
  3. Are there archival/regulatory needs (PDF/A, digital signatures, long-term retention) FPDF cannot satisfy?
  4. What PDF generation already exists in the stack? A second engine is an operational cost, not a feature.
  5. Who owns the fork when a PHP 9 incompatibility lands?

Integration Approach

Recommendation: do not integrate this package. The maintained fork setasign/fpdf (1.8.x, PHP 8 compatible, drop-in API) delivers the same semantics without the wrong-framework coupling; a Laravel-native HTML-to-PDF option is preferable if fidelity matters. The bundle contributes nothing a Laravel product can consume.

Stack fit. FPDF itself is a single plain PHP class with no framework coupling and works anywhere. The bundle is the only framework-coupled artifact, and it is coupled to the wrong framework. This is the decision's crux: the valuable 5% (the library) is available elsewhere and better maintained; the unusable 95% (Symfony integration) is the entire reason the package exists.

Migration path (if leadership insists on proceeding).

  1. Run composer require mayeco/fpdf-bundle --dry-run — a 15-minute empirical spike that likely closes the question.
  2. If it installs, ignore the Bundle class and instantiate the underlying FPDF class directly.
  3. Re-implement the bundle's defaults (unit, page size, orientation, margins) in config/pdf.php plus a small PdfServiceProvider.
  4. Wrap generation behind a PdfRenderer interface bound to one implementation — the highest-leverage step, capping reversal cost.

Compatibility. Laravel 9–11 / PHP 8.1–8.3: compatible only with setasign/fpdf, essentially never with the 1.7 bundle. Laravel 6–8 / PHP 7.x: the bundle may install, but the maintenance liability is unchanged.

Sequencing. (1) Dependency-conflict spike — ½ day, expected to close the question. (2) Engine selection on merits: requirements → shortlist → HTML-vs-coordinate decision. (3) Prototype the hardest real document, not "Hello World" — only it reveals encoding, pagination, and table-layout problems. (4) Introduce the renderer abstraction. (5) Golden-file regression tests before wiring into user-facing flows.

Operational Impact

Maintenance — effectively zero upstream. Two stars and zero dependents means no downstream bug surface; nothing exercises this code, so latent breakage appears in your production, not a GitHub issue. Bus factor is one, and that person is likely inactive. Everything the package touches becomes your team's to own.

Support — none for the bundle layer. There is no community, no StackOverflow corpus specific to this wrapper, and no vendor. Generic FPDF knowledge is decent, but it will not cover the Symfony wiring — which is, again, the part you would discard.

Scaling. PDF generation is CPU-bound and synchronous: under Laravel, run it on queue workers, never in the request cycle. A 200-page statement blocks a web worker and can blow past memory_limit; FPDF assembles the document in memory and cannot stream progressively. Plan for a per-document memory ceiling and a hard cap on rows/pages per job.

Failure modes to instrument for.

  • Memory exhaustion on large tables — enforce document-size limits and alert on worker OOM.
  • Font directory problems — FPDF requires font definition files on disk; pin the path in config, not code.
  • Encoding corruption — silently mangled names in customer-facing PDFs; add a non-ASCII fixture to CI.
  • Deprecation noise / fatal errors on PHP 8.2+ from the 1.7 codebase — pollutes logs and masks real issues.
  • Headers-already-sent if output is echoed rather than returned through a Laravel response.
  • License/attribution metadata reaching customers — a Legal review item, not an engineering one.

Ramp-up. The FPDF API is learnable in a day, but producing correct multi-page table layout with repeating headers, page breaks, and mixed content realistically takes 1–2 weeks per engineer to get right.

Cost of reversal. Low if the renderer abstraction exists; high if FPDF calls are scattered across controllers, jobs, and mailables. Every engine has a different layout model, so switching cost lives in the layout code, not the integration.

Bottom line for the product decision: the 0.01 score is accurate. This package bundles an unmaintained 2011 library into the wrong framework for a stack that cannot consume it, with a fork-based workaround costing more than the 50 lines it saves. Decline adoption; spend the 1–2 days on a thin Laravel service provider over setasign/fpdf — or, more likely, on the HTML-rendering engine the requirements actually call for. The TPM lever here is not adoption but leverage: use the score, the dependency-conflict spike, and the risk table to force an early engine-selection decision and cap downstream cost.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core