PHP Classes

File: examples/pdfMobileScreen.php

Recommend this page to a friend!
  Classes of Dawood Ikhlaq  >  PHP Chrome PDF  >  examples/pdfMobileScreen.php  >  Download  
File: examples/pdfMobileScreen.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: 3 years ago
Size: 445 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__);
$chrome->useMobileScreen();
//not necessary to set window size
$chrome->setWindowSize($width=768, $height=768);
print
"Pdf successfully generated :".$chrome->getPdf().PHP_EOL;

For more information send a message to info at phpclasses dot org.