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
Laravel Puppeteer Pdf Converter

Laravel Puppeteer Pdf Converter Laravel Package

statikbe/laravel-puppeteer-pdf-converter

A Laravel package that converts Blade views or HTML into PDFs using Puppeteer and headless Chrome. It provides a simple API for generating PDFs from templates or URLs, with configurable options for page size, margins, headers, and more.

View on GitHub
Deep Wiki
Context7

This is a convenience wrapper for the Statik Puppeteer PDF conversion API on AWS Lambda.

Frequently asked questions about Laravel Puppeteer Pdf Converter
What is statikbe/laravel-puppeteer-pdf-converter used for?
It is a Laravel convenience wrapper for the Statik Puppeteer PDF conversion API on AWS Lambda. It lets you turn Blade views, HTML strings, or URLs into PDFs using Puppeteer and headless Chrome through a simple package API. It supports configurable page size, margins, headers, and other PDF options. It is aimed at Laravel applications that want server-side HTML-to-PDF conversion without building the Puppeteer integration themselves.
How do I install statikbe/laravel-puppeteer-pdf-converter in Laravel?
Install it with Composer using composer require statikbe/laravel-puppeteer-pdf-converter. Laravel package auto-discovery should register the service provider, but check the README for any publishable configuration or environment variables. You will need to configure access to the Statik Puppeteer PDF conversion API before generating PDFs. Confirm the required PHP and Laravel versions in the package composer.json before installing.
Does this package require Node.js or Chromium on my server?
No, it is a wrapper around an AWS Lambda PDF conversion API, so your Laravel server does not need to run Node.js, Puppeteer, or Chromium locally. You do need network access to the API and the required configuration or credentials. That makes it different from packages that launch a local headless browser. Check the README for the exact API endpoint and authentication setup.
Which Laravel and PHP versions are supported?
The package is built for Laravel applications, but the supported PHP and Laravel version ranges should be confirmed from its composer.json and README. The v1.4.1 release is a patch update and does not indicate a change to framework support. Before adopting it, verify compatibility with your application's PHP version and Laravel release. If you are on an older Laravel version, check whether the service provider and dependencies still resolve.
How do I generate a PDF from a Blade view or HTML string?
The package exposes a simple PDF generation API for templates and HTML. For Blade views, render the view to HTML first, then pass that HTML to the converter, or use the package's documented view helper if available. Review the README for the exact facade or service method names. Test a representative template in staging to verify fonts, images, and CSS rendering.
Can I generate a PDF from a URL?
Yes, the package description states that it can generate PDFs from templates or URLs. Passing a URL is useful when the page already exists and you want Puppeteer to render it through the API. Make sure the URL is reachable from the conversion service and does not require interactive authentication unless the API supports it. For internal pages, confirm network access and any required headers or cookies.
How do I configure page size, margins, and headers?
The package supports configurable PDF options such as page size, margins, and headers. These are typically set through the package configuration file or per-generation options passed to the converter. Check the README for the exact option names and accepted values. Validate the output with your real templates because header and margin behavior can vary by page size.
Is PDF generation synchronous, or can I queue it?
Calls to the remote conversion API are request-based, so you can invoke them synchronously for small jobs or from a Laravel queued job for larger workloads. Queuing is advisable when PDFs are large, generated in batches, or part of a slow user flow. The package itself is a client wrapper, so queue behavior depends on how you call it in your application. Use Laravel jobs, retries, and timeouts to handle API latency and failures.
What changed in v1.4.1 and is it safe to upgrade?
The v1.4.1 release is a patch update that fixes body functions and PHPStan errors. Those changes point to internal request body handling and static-analysis clean-up rather than new features or deprecations. No breaking change is indicated, so upgrading from v1.4.0 should be low risk. Still run your PDF regression tests and verify any custom body input handling after the upgrade.
What are alternatives to this package for HTML-to-PDF in Laravel?
Alternatives include Dompdf wrappers, wkhtmltopdf packages, and Browsershot-based packages that run Puppeteer locally or on your own infrastructure. The right choice depends on whether you need JavaScript rendering, CSS support, local browser control, or a managed remote API. This package is a good fit when you want Laravel integration with the Statik Puppeteer API and do not want to maintain Chromium yourself. Compare hosting requirements, cost, and PDF fidelity before switching.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console