PHPackages                             beetpix/silverstripe-screenshot - 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. beetpix/silverstripe-screenshot

ActiveSilverstripe-vendormodule[PDF &amp; Document Generation](/categories/documents)

beetpix/silverstripe-screenshot
===============================

SDK with helpers to access printscreenapi.com

1.0.2(5y ago)08BSD-3-ClausePHPCI failing

Since May 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/beetpix/silverstripe-screenshot)[ Packagist](https://packagist.org/packages/beetpix/silverstripe-screenshot)[ RSS](/packages/beetpix-silverstripe-screenshot/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Silverstripe Screenshot Module
==============================

[](#silverstripe-screenshot-module)

[![Build Status](https://camo.githubusercontent.com/25a66332262ab69465dd8cd71e292629d6cde1a847bc74e47d4f38a56cb830df/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f6261646765732f6261646765726261646765726261646765722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/badges/badgerbadgerbadger)

Simple SDK with helpers to screenshot websites and save or download to PDF or JPEG via printscreenapi.com

There's a free plan which is perfect for small projects and allows for 100 fresh screenshots per month with unlimited access to cached images and PDFs.

- [Get an API key](https://printscreenapi.com/plans)
- [Documentation](https://printscreenapi.com/api)

Requirements
------------

[](#requirements)

- SilverStripe Framework 4.0+

Installation
------------

[](#installation)

> Via composer

- Run `composer require beetpix/silverstripe-screenshot`
- Run `/dev/build` in your browser

> Manually

- Download and extract files into `printscreenapi/` in your project's root folder
- Run `/dev/build` in your browser

Configure API key
-----------------

[](#configure-api-key)

Add your API key via YAML or environment file:

YAML

```
Beetpix\PrintScreen
  api_key: YOUR_API_KEY_HERE
```

Environment (.env)

```
PRINTSCREENAPI_KEY="YOUR_API_KEY_HERE"

```

Example usage
-------------

[](#example-usage)

Get image screenshot URL:

```
$url = \Beetpix\PrintScreen::inst()
    ->fullPage()
    ->getImage('https://www.example.com');
```

Download as PDF:

```
\Beetpix\PrintScreen::inst()
    ->downloadPDF('https://www.example.com');
```

Additional options, flush cache and read raw result:

```
$inst = \Beetpix\PrintScreen::inst()
    ->device('phone-landscape')
    ->click('.btn-accept-cookies')
    ->fullPage()
    ->flush();

// Get URL
$url = $inst->getImage('https://www.example.com');

// Download image
$inst->downloadImage('https://www.example.com');

// Read raw result
print_r($inst->getResult());
```

Available methods
-----------------

[](#available-methods)

For detailed explanation about each parameter, please check out the the documentation at:

MethodParametersDescriptionAPI parametergetImagestring $target = nullReturn screenshot image URL-getPDFstring $target = nullReturn screenshot PDF URL-downloadPDFstring $target = null, string $filename = nullDownload PDF-downloadImagestring $target = null, string $filename = nullDownload image-widthint $valueViewport widthwidthheightint $valueViewport heightheightscrollTostring $valueScroll to elementscrolltoclickstring $valueClick on elementclickflush-Force fresh screenshotflushfullPage-Take a full page screenshotfullpagecropint $x, int $y, int $width, int $heightCrop selected area in pixelscropdevicestring $valueSet device (default is "desktop")deviceelementstring $valueScreenshot only specified elementelementpaperSizestring $valuePaper size for PDF (default is "A4")sizedelayint $valueDelay in seconds between page loaded and screenshot actiondelaycookiesarray $valueSet page cookiescookiesheadersarray $valueSet page headersheadersgeolocationfloat $lat, float $lngSet geolocation coordinatesgeolocationdisableJS-Disable javascriptdisablejsagentstring $valueSet browser agentagentinjectJSstring $valueInject javascript into the pageinjectjsinjectCSSstring $valueInject CSS into the pageinjectcssproxystring $valueProxy host and portproxygetResult-Return raw API result-isError-Return TRUE if API call was unsuccessful-Note
----

[](#note)

Since the API call may take a few extra seconds to complete depending on the parameters you set (eg. `delay` or `fullPage`) it is recommended that you make calls via AJAX if adding screenshot functionality that requires user interaction via web browser to prevent timeouts.

License
-------

[](#license)

- **[BSD 2](https://opensource.org/licenses/BSD-2-Clause)**

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~6 days

Total

3

Last Release

2161d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f3411b0a1a971cc4dafe4f9483b8991f3414d009c5676c508925e40ee0e384a?d=identicon)[beetpix](/maintainers/beetpix)

---

Top Contributors

[![beetpix](https://avatars.githubusercontent.com/u/66008824?v=4)](https://github.com/beetpix "beetpix (8 commits)")

---

Tags

pdfsilverstripescreenshotcapture

### Embed Badge

![Health badge](/badges/beetpix-silverstripe-screenshot/health.svg)

```
[![Health](https://phpackages.com/badges/beetpix-silverstripe-screenshot/health.svg)](https://phpackages.com/packages/beetpix-silverstripe-screenshot)
```

###  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)[sensiolabs/gotenberg-bundle

A Symfony bundle that provides seamless integration with Gotenberg for generating PDFs and screenshots from various sources (HTML, Markdown, Office documents, URLs) with a clean, builder-based API.

210210.4k2](/packages/sensiolabs-gotenberg-bundle)[its404/php-puppeteer

PHP Wrapper for Google Chrome Puppeteer

30303.1k1](/packages/its404-php-puppeteer)[symbiote/silverstripe-pdfrendition

A module that makes use of the Flying Saucer XHTML renderer project to create PDFs from XHTML pages.

175.0k](/packages/symbiote-silverstripe-pdfrendition)

PHPackages © 2026

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