Add Header to PDF File

Hi,
I got it working today :D.

My setup is:
• XAMPP for Windows - 1.7.3.0

o PHP - 5.3.1

o MySql Client API version - 5.1.41

• TCPDF - 5.9.046
• FPDI – 1.4
• FPDF_TPL - 1.2

I downloaded FPDF_TPL and put it in \xampp\php\PEAR. That was pretty much it. It works like a dream. I got this small test program from another forum (try it):

<?php
require_once('TCPDF/tcpdf.php');
require_once('FPDI/fpdi.php');

$pdf = new FPDI();

$pdf->AddPage();

$pdf->setSourceFile('existing_file.pdf');
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx);

$pdf->SetFont('Courier', '', 10);

$pdf->SetXY(20, 10);
$pdf->Write(0, "Text to be stamped");

$pdf->Output("output_sample.pdf", "D");
?>