- Can I use padam87/rasterize-bundle in a Laravel application?
- Not directly. padam87/rasterize-bundle is a Symfony bundle, so Laravel will not load its Bundle class, DI extension, or compiler passes. You can still require it with Composer and manually instantiate the rasterizer classes behind a Laravel service provider, but only if those classes are decoupled from Symfony contracts. Spike one render first; if the wiring fails, use Browsershot, Snappy, or a rendering sidecar instead.
- How do I install padam87/rasterize-bundle?
- Install it with composer require padam87/rasterize-bundle. In Symfony you register the bundle and configure the engine through the bundle's configuration tree. In Laravel there is no Symfony bundle auto-registration, so a plain install only gives you the classes and you still need to wire services manually. Check the package's PHP and Symfony constraints before committing.
- Which HTML-to-PDF engines does rasterize-bundle support?
- The bundle abstracts over multiple engines and advertises Puppeteer and PhantomJS support. Engines are registered as tagged rasterizer services, and the bundle handles selecting one through configuration. Treat PhantomJS as unsupported because the project is archived, and verify which engines actually have maintained test coverage before relying on them. Puppeteer is the realistic choice but adds a Node and Chromium runtime.
- Does padam87/rasterize-bundle need Node.js and Chromium in production?
- For the Puppeteer backend, yes: PHP spawns a Node process that drives a headless Chromium binary, so the runtime needs Node, Chromium, and compatible fonts. Binary location is typically resolved through PATH or configuration, and Alpine/musl images need extra care. If you cannot run Chromium in your PHP containers, point the renderer at an external service instead.
- Will rasterize-bundle conflict with Laravel's Symfony components?
- It can. The bundle constrains Symfony packages such as process, filesystem, and http-foundation, and those constraints may collide with the versions Laravel has locked. Run composer why-not to see the exact conflict before you plan around it. The practical approach is a throwaway spike branch that requires the package and renders one document, rather than adding it to your main application first.
- Is it safe to render user-supplied HTML with this bundle?
- Rendering untrusted HTML invites SSRF, local file reads through file URLs, and resource exhaustion. Sandbox the renderer in an isolated container, block metadata endpoints and internal network egress, disable local file access, and cap CPU, memory, and wall-clock time. The package's low adoption means its process-spawning code has had little peer review, so treat hardening as your responsibility.
- Does the bundle support queued or asynchronous PDF rendering?
- The available material does not confirm async support; expect synchronous process wrapping around the chosen engine. In Laravel, dispatch rendering to a queue job yourself and set explicit process timeouts and memory limits so a hung Chromium process cannot stall workers. Ask the maintainer about cancellation and concurrency controls if you need them.
- Can I generate image thumbnails from uploaded PDFs with this package?
- Yes, rasterizing documents into page images is the bundle's stated purpose, which suits thumbnails and previews. Before adopting it in Laravel, confirm what the renderer returns, whether a stream, temp file, or binary string, and who owns cleanup. Also confirm how it handles multi-page PDFs, resolution, and output format.
- What are better alternatives for HTML-to-PDF in Laravel?
- For direct library use, Browsershot and Snappy are the common choices; Browsershot wraps Puppeteer and Snappy wraps wkhtmltopdf. For isolation and scaling, use a sidecar or managed service such as Browserless, PDFShift, or DocRaptor over HTTP or a queue. Skipping the Symfony bundle entirely usually means less wiring and a smaller dependency surface.
- Is padam87/rasterize-bundle actively maintained?
- The repository shows a recent release, which is a positive activity signal, but it has roughly 15 stars, zero dependents, and a single maintainer. Low adoption means little peer review of security-sensitive process code and a real bus-factor risk. Use it as a reference implementation or with a clear exit plan, not as critical infrastructure.