PHPackages                             ngekoding/browsershot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. ngekoding/browsershot

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

ngekoding/browsershot
=====================

Convert a webpage to an image or pdf using headless Chrome

v1.0.1(4y ago)0263MITPHP

Since Dec 24Pushed 4y agoCompare

[ Source](https://github.com/ngekoding/browsershot)[ Packagist](https://packagist.org/packages/ngekoding/browsershot)[ Docs](https://github.com/ngekoding/browsershot)[ GitHub Sponsors](https://github.com/spatie)[ RSS](/packages/ngekoding-browsershot/feed)WikiDiscussions php5.6 Synced 2d ago

READMEChangelog (2)Dependencies (1)Versions (6)Used By (0)

Convert a webpage to an image or pdf using headless Chrome
==========================================================

[](#convert-a-webpage-to-an-image-or-pdf-using-headless-chrome)

The package can convert a webpage to an image or pdf. The conversion is done behind the scenes by [Puppeteer](https://github.com/GoogleChrome/puppeteer) which controls a headless version of Google Chrome.

PHP 5.6 Support
---------------

[](#php-56-support)

This package base on **spatie/browsershot** package, built to support PHP 5.6 version.

Here's a quick example:

```
use Ngekoding\Browsershot\Browsershot;

// a pdf will be saved
Browsershot::url('https://example.com')->save('path/to/result.pdf');
```

You can also use an arbitrary html input, simply replace the `url` method with `html`:

```
Browsershot::html('Not just hello world!')->save('path/to/result.pdf');
```

Features:

- Converting a webpage to pdf.
- Converting a webpage to image (coming soon).

How to install
--------------

[](#how-to-install)

```
composer require ngekoding/browsershot
```

Please go to the original package for full documentation.

[Documentation](https://github.com/spatie/browsershot)

Important
---------

[](#important)

You have to install the Puppeteer node library to make this package worked.

This package requires node 7.6.0 or higher and the Puppeteer Node library.

On MacOS you can install Puppeteer in your project via NPM:

```
npm install puppeteer
```

Or you could opt to just install it globally

```
npm install puppeteer --global
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 75.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~644 days

Total

3

Last Release

1773d ago

PHP version history (2 changes)v2.x-devPHP ^7.0

v1.0.0PHP ^5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/badefbaef2fd421d3b05261b2eb984562dee50392d83632bdb6549aff655e25e?d=identicon)[ngekoding](/maintainers/ngekoding)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (219 commits)")[![rubenvanassche](https://avatars.githubusercontent.com/u/619804?v=4)](https://github.com/rubenvanassche "rubenvanassche (12 commits)")[![ngekoding](https://avatars.githubusercontent.com/u/11625690?v=4)](https://github.com/ngekoding "ngekoding (8 commits)")[![brendt](https://avatars.githubusercontent.com/u/6905297?v=4)](https://github.com/brendt "brendt (6 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (6 commits)")[![darron1217](https://avatars.githubusercontent.com/u/8064923?v=4)](https://github.com/darron1217 "darron1217 (4 commits)")[![WidgetsBurritos](https://avatars.githubusercontent.com/u/5263371?v=4)](https://github.com/WidgetsBurritos "WidgetsBurritos (3 commits)")[![carlcs](https://avatars.githubusercontent.com/u/7516543?v=4)](https://github.com/carlcs "carlcs (3 commits)")[![itsgoingd](https://avatars.githubusercontent.com/u/821582?v=4)](https://github.com/itsgoingd "itsgoingd (3 commits)")[![jpoesen](https://avatars.githubusercontent.com/u/174225?v=4)](https://github.com/jpoesen "jpoesen (2 commits)")[![rydurham](https://avatars.githubusercontent.com/u/674347?v=4)](https://github.com/rydurham "rydurham (2 commits)")[![shahabphp](https://avatars.githubusercontent.com/u/16016102?v=4)](https://github.com/shahabphp "shahabphp (2 commits)")[![code2prog](https://avatars.githubusercontent.com/u/22845213?v=4)](https://github.com/code2prog "code2prog (2 commits)")[![artggd](https://avatars.githubusercontent.com/u/1837559?v=4)](https://github.com/artggd "artggd (2 commits)")[![gauravmak](https://avatars.githubusercontent.com/u/11887260?v=4)](https://github.com/gauravmak "gauravmak (1 commits)")[![adrianspacely](https://avatars.githubusercontent.com/u/3690710?v=4)](https://github.com/adrianspacely "adrianspacely (1 commits)")[![jmslbam](https://avatars.githubusercontent.com/u/145887?v=4)](https://github.com/jmslbam "jmslbam (1 commits)")[![luceos](https://avatars.githubusercontent.com/u/504687?v=4)](https://github.com/luceos "luceos (1 commits)")[![MetalArend](https://avatars.githubusercontent.com/u/1175661?v=4)](https://github.com/MetalArend "MetalArend (1 commits)")[![mihaliak](https://avatars.githubusercontent.com/u/3680162?v=4)](https://github.com/mihaliak "mihaliak (1 commits)")

---

Tags

pdfconvertimageheadlesswebpagechromescreenshotpuppeteer

### Embed Badge

![Health badge](/badges/ngekoding-browsershot/health.svg)

```
[![Health](https://phpackages.com/badges/ngekoding-browsershot/health.svg)](https://phpackages.com/packages/ngekoding-browsershot)
```

###  Alternatives

[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[chrome-php/chrome

Instrument headless chrome/chromium instances from PHP

2.6k4.5M64](/packages/chrome-php-chrome)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3685.2M19](/packages/gotenberg-gotenberg-php)[spatie/pdf-to-image

Convert a pdf to an image

1.4k15.2M64](/packages/spatie-pdf-to-image)[spiritix/php-chrome-html2pdf

A PHP library for converting HTML to PDF using Google Chrome

153472.0k3](/packages/spiritix-php-chrome-html2pdf)[daandesmedt/phpheadlesschrome

A PHP wrapper for using Google Chrome Headless mode. Convert URL or HTML to a PDF / screenshot. Easy to use and OOP interfaced.

92233.1k](/packages/daandesmedt-phpheadlesschrome)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
