PHP Classes

File: examples/pdf.php

Recommend this page to a friend!
  Classes of Dawood Ikhlaq   PHP Chrome PDF   examples/pdf.php   Download  
File: examples/pdf.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: 419 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://youtube.com', '/usr/bin/google-chrome');
$chrome->setOutputDirectory(__DIR__);

//not necessary to set window size
//$chrome->setWindowSize($width=1477,$height=768);
print "Pdf successfully generated :".$chrome->getPdf().PHP_EOL;