PHP Classes

File: examples/screenshot.php

Recommend this page to a friend!
  Classes of Dawood Ikhlaq   PHP Chrome PDF   examples/screenshot.php   Download  
File: examples/screenshot.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Chrome PDF
Generate PDF or images of HTML pages with Chrome
Author: By
Last change: Apply fixes from StyleCI
Date: 6 years ago
Size: 428 bytes
 

Contents

Class file image Download
<?php
/**
 * Created by PhpStorm.
 * User: dawood ikhlaq
 * Date: 7/8/2017
 * Time: 3:08 PM
 */
include '../vendor/autoload.php';

use
dawood\phpChrome\Chrome;

$chrome=new Chrome('https://facebook.com', '/usr/bin/google-chrome');
$chrome->setOutputDirectory(__DIR__);
//not necessary to set window size
$chrome->setWindowSize($width=1366, $height=1024);
print
"Image successfully generated :".$chrome->getScreenShot().PHP_EOL;