2017 © Pedro Peláez
 

library portrayal

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

image

engage/portrayal

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

  • Friday, February 6, 2015
  • by MiniCodeMonkey
  • Repository
  • 10 Watchers
  • 3 Stars
  • 72 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

Build Status, (*1)

Portrayal

This simple, self-contained library allows you to capture screenshots using PhantomJS., (*2)

The library is much inspired by Laravel Cashier's PDF generation process., (*3)

Installation

You can install this package through Composer. Edit your project's composer.json file to require engage/portrayal., (*4)

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

Now run composer update from the terminal, and you're good to go!, (*5)

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);, (*6)

The Versions

06/02 2015

dev-master

9999999-dev

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

  Sources   Download

The Requires

 

The Development Requires

by Mathias Hansen