PHP Classes

File: example/download.php

Recommend this page to a friend!
  Classes of Dave Smith   Convert HTML to PDF PHP Library   example/download.php   Download  
File: example/download.php
Role: Example script
Content type: text/plain
Description: Example Usage
Class: Convert HTML to PDF PHP Library
Convert HTML to PDF using pdflayer API
Author: By
Last change:
Date: 8 years ago
Size: 333 bytes
 

Contents

Class file image Download
<?php
/*
Downloading a webpage
*/

include('../html2pdf.class.php');
$h2pdf = new html2pdf();

//set the url to convert
$h2pdf->setParam('document_url','https://www.google.com/');

//start the conversion
$h2pdf->convertHTML();

//download the pdf file using supplied name
$h2pdf->downloadCapture('google.pdf');

?>