PHP Classes

File: usage.php

Recommend this page to a friend!
  Classes of Rupom Razzaque   HTML 2 PDF Report   usage.php   Download  
File: usage.php
Role: Example script
Content type: text/plain
Description: Example Usage
Class: HTML 2 PDF Report
Generate PDF documents from HTML pages
Author: By
Last change: Because of some user-queries, I am adding a "PDF version" option. Using this option, you will be able to set and get your preferred PDF version(according to your PDF reader).
Date: 17 years ago
Size: 951 bytes
 

Contents

Class file image Download
<?php
/**
* HTML2PDFReport Generator Class
*
* @author : MA Razzaque Rupom <rupom_315@yahoo.com>, <rupom.bd@gmail.com>
* Moderator, phpResource (http://groups.yahoo.com/group/phpresource/)
* URL: http://www.rupom.info
* @version : 1.0
* @date 05/06/2006 modified on 06/23/2006
* Purpose : Generating Pdf Report from HTML
*/

require_once('Html2PdfReport.class.php');
$obj = new Html2PdfReport();

//pdf version
$pdfVersion = '1.4'; //change it according to your need
/*
$pdfVersion = 1.3 for Acrobat Reader 4
$pdfVersion = 1.4 for Acrobat Reader 5
$pdfVersion = 1.5 for Acrobat Reader 6
*/

//set PDF version
$obj->setPdfVersion($pdfVersion);

//set URL of the HTML file which will be converted to PDF
$obj->setUrl("http://localhost/phpclasses/sql2pdfreport/first_test.html");//change this according to your URL

//get the pdf report of the URL data
$obj->getPdfReport();
?>