eve/pdf-converter
A Laravel package for converting PDF files, offering a simple API to handle PDF transformation tasks within your PHP applications. Lightweight and easy to integrate, it helps streamline document conversion workflows with minimal setup.
Architecture fit
eve/pdf-converter follows the conventional Laravel package shape: a service provider, a publishable config file, a facade, and a driver/manager abstraction that resolves a concrete PDF engine from configuration at runtime. For a team already standardized on Laravel service providers and facades, the ergonomics are familiar and the integration surface is small — typically one config entry plus a PDF::load($html)->save($path)-style call.
The abstraction is the package's only defensible value proposition. However, HTML→PDF engines diverge sharply on the things that actually matter to product teams: CSS support (flexbox/grid), page-break semantics, header/footer templating, font embedding, and CJK/RTL handling. A single "driver-agnostic" API almost always leaks, so the switching benefit is smaller in practice than the README implies. Expect driver-specific escapes to appear in application code within the first few months.
Integration feasibility
Composer-installable and low-ceremony on the Laravel versions current at its last release (Feb 2022), which likely means Laravel 8/9 and PHP 7.4–8.1. On Laravel 10/11/12 and PHP 8.2+, constraints on the package itself and on its transitive dependencies (DomPDF, mPDF, or a wkhtmltopdf/Snappy wrapper) are the probable failure point — not the package's own code, which is small. Verify by reading composer.json require/require-dev blocks and any CI matrix before committing to a spike.
Also confirm the driver set. If a headless-Chrome driver (Browsershot/Puppeteer) is in scope, integration stops being a Composer problem and becomes a container/build problem: Node, Chromium, sandbox flags, font packages, shared-memory sizing.
Technical risk
file://, http://169.254.169.254, @import chains). An unmaintained package will not ship mitigations, so hardening lands on you.Key questions
barryvdh/laravel-dompdf or spatie/laravel-pdf, both of which are maintained?Verdict: viable as a forked, vendored, internally owned component; not viable as a trusted upstream dependency.
Stack fit
Good fit for a Laravel 8/9 monolith or modular monolith. Poor fit if the surrounding platform is on Laravel 10+ or has migrated to a queue-first, container-per-job rendering model — you would be adopting an abstraction shaped for a synchronous, single-container era.
Migration path
composer require eve/pdf-converter; render three representative documents (short invoice, long multipage report with headers/footers, one with embedded images/fonts). Record failures per driver.PdfRenderer contract with two thin adapters (DomPdfRenderer, BrowsershotRenderer). Option (b) is usually ~150–250 LOC and removes the dependency entirely — often the better trade.App\Contracts\PdfRenderer with render(HtmlDocument): RenderedPdf. This is the single highest-value step: it makes the eventual swap a container binding change.Compatibility
Pin the driver engine explicitly rather than floating. Pin the system binary version (wkhtmltopdf/Chromium) in the base image. Treat the PDF engine as infrastructure, versioned with the container, not as an application library.
Sequencing
Interface first → spike → fork-or-replace decision → container/base-image work (if binary driver) → queue wiring → cutover. Do not start by installing the package into the main application; the interface boundary must exist before any dependency lands.
Maintenance
Budget ownership explicitly. A fork of this size needs roughly 1–2 engineer-days per quarter for dependency bumps and CI upkeep, plus a forced review any time we move Laravel major versions. Without a named owner, this becomes a silent liability that surfaces as a broken invoice run.
Support
No upstream support, no issue triage, no security advisories. Internal SME required — realistically one backend engineer who understands the chosen engine's quirks. Document the driver choice and its known rendering limitations in the runbook; the next engineer will otherwise rediscover them under incident pressure.
Scaling
PDF rendering is CPU- and memory-bound and blocks the request thread. Never render inline in a user-facing request beyond small single-page documents. Move to dedicated queue workers with their own pool, generous memory_limit (256–512 MB is not unusual for Chromium), per-job timeouts, and a concurrency cap sized to the node. Write output to object storage, not local disk, so workers remain stateless and horizontally scalable. Expect roughly 100–500 ms per page for DomPDF-class engines and 0.5–3 s per document for headless-Chrome-class engines — measure, don't assume.
Failure modes
/tmp under load.Mitigations: base image with pinned binary and font set, healthcheck that renders a canary document at deploy, asset allowlist, structured job failures with dead-letter queue, and a golden-file visual regression test on a document corpus.
Ramp-up
Low. The package is small and the Laravel idioms are standard; a mid-level Laravel engineer is productive in under a day. The real ramp-up cost is engine-specific knowledge (CSS caveats, font handling, header/footer templating), which is 1–2 weeks to genuine proficiency and is not transferable between drivers.
Recommendation: Proceed only with a fork or an in-house adapter behind an owned interface; reject as a direct upstream dependency. If the requirement is simply "HTML to PDF in Laravel," evaluate spatie/laravel-pdf and barryvdh/laravel-dompdf first — both are maintained, and the multi-driver abstraction here does not justify the abandonment risk at 11 stars and zero dependents.
How can I help you explore Laravel packages today?