spatie/browsershot

Convert HTML to an image, PDF or string

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 13 minutes ago
Added to GitGenius on September 13th, 2026
Created on May 2nd, 2014
Open Issues & Pull Requests: 0 (+0)
GitHub issues: Disabled - open counts may still include pull requests.
Number of forks: 508
Total Stargazers: 5,244 (+0)
Total Subscribers: 56 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

GitHub issues are disabled for this repository, so issue analytics and the issue explorer are not available.

Detailed Description

Browsershot is a PHP package that converts HTML to images, PDFs, or strings by running a headless version of Google Chrome through Puppeteer.

The package solves the problem of programmatically rendering web pages to static files or extracting their rendered content. It works by delegating the rendering work to Puppeteer, a Node.js library that controls a headless Chrome instance. Users can convert URLs or arbitrary HTML input to images or PDFs by calling simple methods, and the tool also supports retrieving the rendered body after JavaScript execution and capturing all network requests triggered during page load.

Browsershot suits projects that need server-side web page rendering in a PHP environment. It requires Node.js and Puppeteer to be installed alongside the PHP package. The README mentions that older versions exist for different use cases: version 2 uses Chrome's headless CLI instead of Puppeteer for environments where Node cannot be installed, and version 1 used the abandoned PhantomJS binary, though neither is maintained.

The project maintains an active test suite that requires Puppeteer and the pdftotext CLI tool from poppler-utils. It follows a structured contribution process with a dedicated security contact for vulnerability reports.