PHP Classes

File: examples/pdfFromHtmlCode.php

Recommend this page to a friend!
  Classes of Dawood Ikhlaq   PHP Chrome PDF   examples/pdfFromHtmlCode.php   Download  
File: examples/pdfFromHtmlCode.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: 313 bytes
 

Contents

Class file image Download
<?php

include '../vendor/autoload.php';

use
dawood\phpChrome\Chrome;

$chrome=new Chrome(null, '/usr/bin/google-chrome');
$chrome->useHtml("<h2>I am test Pdf</h2>");

print
"Pdf successfully generated :".$chrome->getPdf().PHP_EOL;
//print "screenShot successfully generated :".$chrome->getScreenShot().PHP_EOL;