Login   Register  
PHP Classes
elePHPant
Icontem

File: demo.class.pdffile.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Laurens Ramandt  >  PDF print  >  demo.class.pdffile.php  >  Download  
File: demo.class.pdffile.php
Role: Example script
Content type: text/plain
Description: Example use
Class: PDF print
Alter a PDF document to make it print when opened
Author: By
Last change:
Date: 2010-08-23 14:40
Size: 415 bytes
 

Contents

Class file image Download
<?php
require("class.pdffile.php");

//example A: insert javascript and save as new file
$obj = new pdfFile("example.pdf");
$obj->insertPrintCode();
$obj->saveAs("example-print.pdf");

//example B: insert javascript and output the file
$obj = new pdfFile("example.pdf");
//sets the header information, automatically inserts print code
//and echos the pdf contents (cfr. __toString method)
echo $obj;
?>