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

Pdf Bundle Laravel Package

psliwa/pdf-bundle

Symfony bundle for generating PDFs from HTML with wkhtmltopdf. It wraps the psliwa/php-pdf library, integrates with Twig templates, and exposes configurable PDF options, making it straightforward to render invoices, reports, and other documents in Symfony applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: Poor for a Laravel codebase. psliwa/pdf-bundle is a Symfony2 bundle, not a Laravel package. It expects Symfony’s kernel, dependency-injection container, bundle configuration, and Symfony2-era conventions. Laravel’s service container, package discovery, config publishing, and facades do not map to it. The only reusable layer is the underlying psliwa/PHPPdf library, and even that would require a custom Laravel adapter.
  • Integration feasibility: Low as-is, moderate only if the team deliberately wraps the underlying PHPPdf library. Direct installation of the bundle into Laravel is not a supported path. The bundle targets EOL Symfony2, and PHPPdf is an older XML-markup-driven PDF generator. Composer constraints are likely to conflict with modern PHP and Laravel versions. The repository has 118 stars and zero dependents, which signals low community validation and limited real-world usage.
  • Technical risk: High. Symfony2 is end-of-life, PHPPdf appears legacy, and the dependency chain may include unsupported or unpatched components. There is no native Laravel integration, little modern documentation, and no obvious maintainer commitment. XML-based templating adds a separate authoring model that most Laravel teams do not use. MIT licensing allows forking, but forking an abandoned rendering stack is a significant ownership burden.
  • Key questions: Is PHPPdf specifically required, or is the real requirement “generate PDFs from templates”? What PHP and Laravel versions must be supported? Are there existing PHPPdf XML templates that must be preserved? Does PHPPdf install and run on PHP 8.1+ without patching? What are the font, image, barcode, page-layout, and accessibility requirements? Is the bundle needed at all, or only the underlying library? What is the fallback if the package cannot be maintained? What security review is required for legacy PDF and XML parsing dependencies?

TPM position: Do not recommend this bundle for new Laravel work. Treat it as a legacy Symfony integration or as a possible source of an isolated PHPPdf adapter only after a proof of concept.

Integration Approach

  • Stack fit: The Symfony bundle does not fit Laravel. Laravel teams should not install psliwa/pdf-bundle into an Illuminate application. If PHPPdf output compatibility is mandatory, consume psliwa/PHPPdf directly behind a Laravel service provider and a PdfGenerator interface. Keep Symfony-specific configuration out of the Laravel application.
  • Migration path: For an existing Symfony2 application, retain the bundle only as a short-term stabilization step and plan migration to a maintained PDF stack. For Laravel, start with a bounded proof of concept: generate one representative document using PHPPdf directly in a CLI command or queued job, not through the Symfony bundle. If successful, wrap it as an internal adapter with contract tests. If unsuccessful, replace it with a Laravel-friendly option such as Dompdf, mPDF, Snappy/wkhtmltopdf, or Browsershot, depending on HTML/CSS fidelity requirements.
  • Compatibility: Verify Composer requirements against the target Laravel version before any design work. Modern Laravel requires current PHP versions, while Symfony2-era bundles typically assume PHP 5.x and old Symfony components. Expect dependency conflicts, deprecated APIs, and possible fatal errors on PHP 8+. Run a disposable compatibility spike and static analysis before committing to a migration estimate.
  • Sequencing: First, inventory PDF templates, expected outputs, and regulatory/archival requirements. Second, run a time-boxed PHPPdf compatibility spike on the target PHP runtime. Third, compare against maintained alternatives using the same representative documents. Fourth, if PHPPdf is retained, build a Laravel adapter, isolate it behind an interface, add golden-file regression tests, and run generation through queues. Fifth, document rollback to the alternative renderer. Do not sequence bundle adoption before proving the underlying library works.

Operational Impact

  • Maintenance: High. The bundle is tied to EOL Symfony2, and PHPPdf has low visible adoption. Expect to own patches, dependency pinning, and security remediation. Without an internal fork owner, the package is likely to become unmaintainable.
  • Support: Weak. Community support is limited, dependents are zero, and modern documentation is scarce. The team will rely on source reading, old examples, and internal runbooks. Vendor support is not available.
  • Scaling: PDF generation is CPU- and memory-intensive. XML parsing, font embedding, and image processing can create latency spikes. Use queue workers, strict timeouts, memory limits, and stateless worker instances. Store generated files in object storage and avoid synchronous generation on request paths for large documents.
  • Failure modes: Composer dependency conflicts; PHP fatal errors after runtime upgrades; XML template/schema errors; missing fonts or images; memory exhaustion on large documents; malformed PDF output; path and permission issues in containerized environments; security exposure from legacy dependencies. These failures are often document-specific, so broad regression coverage is required.
  • Ramp-up: Moderate to high. Developers must learn PHPPdf’s XML markup and, if the bundle is used, Symfony2 bundle conventions. Laravel developers will not transfer existing Blade/HTML PDF experience directly. Budget for training, example templates, and golden-file tests. Given the low adoption and legacy status, expect tribal knowledge rather than a smooth onboarding path.
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.
mydnic/volet-feature-board-filament-plugin
wmde/email-address
refinery29/test-util
dees040/laravel-api-responses
teamzac/geocoder
ideatica/config-writer
keaton-php/pipe-dream
jacksonwebservices/laravel-user-suite
maksimru/conditional-laravel-debugbar
gismatul/nova-support-chat
gismatul/laravel-support-chat
networkrailbusinesssystems/oracle-api
alphabalex/messaging-made-easy
rawphp/warp
shootkiran/merobug
narakode/fineauth
numencode/wn-syncops-plugin
ibnnajjaar/mib-global-pay
refinery29/php-cs-fixer-config
parsnick/steak