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.