<?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;
?>
|