2017 © Pedro Peláez
 

library yii-phantomjs-screenshot

The Yii PhantomjsWebpageScreenshot extension that allows to generate screenshots of web pages on the fly

image

dotzero/yii-phantomjs-screenshot

The Yii PhantomjsWebpageScreenshot extension that allows to generate screenshots of web pages on the fly

  • Saturday, April 30, 2016
  • by dotzero
  • Repository
  • 1 Watchers
  • 1 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 14 % Grown

The README.md

Yii Phantomjs WebpageScreenshot

Latest Stable Version License, (*1)

The Yii PhantomjsWebpageScreenshot extension that allows to generate screenshots of web pages on the fly. It uses the headless webkit PhantomJS as a capture-engine., (*2)

PhantomJS is a headless WebKit with JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG., (*3)

Requirements:

Install

Via composer:

$ composer require dotzero/yii-phantomjs-screenshot

Add vendor path to your configuration file, attach component and set properties.

'aliases' => array(
    ...
    'vendor' => realpath(__DIR__ . '/../../vendor'),
),
'components' => array(
    ...
    'screenshot' => array(
        'class' => 'vendor.dotzero.yii-phantomjs-screenshot.EWebpageScreenshot',
        //'phantomjs' => '/bin/phantomjs',
        //'width' => 640,
        //'height' => 480,
    ),
),

Usage:

$screenshot = Yii::app()->screenshot;
$screenshot->width = 640;
$screenshot->height = 480;

$url = 'http://www.google.com';
$outfile = Yii::getPathOfAlias('application.runtime') . '/' . uniqid() . '.png';

$screenshot->capture($url, $outfile);

License

Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php, (*4)

The Versions

30/04 2016

dev-master

9999999-dev

The Yii PhantomjsWebpageScreenshot extension that allows to generate screenshots of web pages on the fly

  Sources   Download

MIT

The Requires

 

by Avatar dotzero

extension yii phantomjs screenshot

30/04 2016

v1.0.0

1.0.0.0

The Yii PhantomjsWebpageScreenshot extension that allows to generate screenshots of web pages on the fly

  Sources   Download

MIT

The Requires

 

by Avatar dotzero

extension yii phantomjs screenshot