PHPackages                             engage/portrayal - 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. engage/portrayal

ActiveLibrary

engage/portrayal
================

Simple, self-contained library allows you to capture screenshots using PhantomJS.

3832[1 issues](https://github.com/EngageDC/Portrayal/issues)[1 PRs](https://github.com/EngageDC/Portrayal/pulls)PHP

Since Feb 6Pushed 10y ago10 watchersCompare

[ Source](https://github.com/EngageDC/Portrayal)[ Packagist](https://packagist.org/packages/engage/portrayal)[ RSS](/packages/engage-portrayal/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/212e7bbb1d665ae1ef93870abfd21440300bfcc24d00d8fbf26ed0f7f51919ca/68747470733a2f2f7472617669732d63692e6f72672f456e6761676544432f506f7274726179616c2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/EngageDC/Portrayal)

Portrayal
=========

[](#portrayal)

This simple, self-contained library allows you to capture screenshots using PhantomJS.

The library is much inspired by [Laravel Cashier](https://github.com/laravel/cashier)'s PDF generation process.

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

[](#installation)

You can install this package through Composer. Edit your project's `composer.json` file to require `engage/portrayal`.

```
"require": {
	"engage/portrayal": "dev-master"
}
```

Now run `composer update` from the terminal, and you're good to go!

Usage
-----

[](#usage)

```
$capture = new \Engage\Portrayal\Capture;
$filename = $capture->snap('https://github.com/engagedc/Portrayal', sys_get_temp_dir());

// $filename = /var/folders/6_/htvcfzcd4cb_w9z6bgpmnx5h0000gn/T/d0582362c2ffbf50ee119e504bb64fdc6bba5abd.png
```

You can adjust the timeout value by appending a third parameter to `snap(...)`. E.g. 15 second timeout: `$filename = $capture->snap('https://github.com/engagedc/Portrayal', sys_get_temp_dir(), 15);`

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ed84123c7f95e96700d9b59e7a3116f3129860e5e58d2b1c502e9cb47b46b8e?d=identicon)[MiniCodeMonkey](/maintainers/MiniCodeMonkey)

---

Top Contributors

[![MiniCodeMonkey](https://avatars.githubusercontent.com/u/220535?v=4)](https://github.com/MiniCodeMonkey "MiniCodeMonkey (13 commits)")

### Embed Badge

![Health badge](/badges/engage-portrayal/health.svg)

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

PHPackages © 2026

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