Not sure if this is the correct forum, but since FPDF is a PHP script, I
thought I would give it a try...
I am having a problem getting ANYTHING to print in a header using the FPDF
functions. I can get text to go into the main body of the PDF file, but
nothing into a header. I have messed with this for several hours, seached
the web and no luck. Any help would be greatly appreciated.
Here is my script - which prints "Test Output" in a PDF file with no header
at all. Any suggestions?
<?php
define('FPDF_FO NTPATH','font/');
require('fpdf.p hp');
class PDF extends FPDF
{
//Page header
function Header()
{
//Arial bold 15
$this->SetFont('Arial ','B',15);
//Move to the right
$this->Cell(80);
//Title
$this->Cell(30,10,'He ader Output',1,1,'C' );
//Line break
$this->Ln(20);
}
}
$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont('Times ','',10);
$pdf->Cell(40,40,"Te st Output");
$pdf->Output();
?>
thought I would give it a try...
I am having a problem getting ANYTHING to print in a header using the FPDF
functions. I can get text to go into the main body of the PDF file, but
nothing into a header. I have messed with this for several hours, seached
the web and no luck. Any help would be greatly appreciated.
Here is my script - which prints "Test Output" in a PDF file with no header
at all. Any suggestions?
<?php
define('FPDF_FO NTPATH','font/');
require('fpdf.p hp');
class PDF extends FPDF
{
//Page header
function Header()
{
//Arial bold 15
$this->SetFont('Arial ','B',15);
//Move to the right
$this->Cell(80);
//Title
$this->Cell(30,10,'He ader Output',1,1,'C' );
//Line break
$this->Ln(20);
}
}
$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont('Times ','',10);
$pdf->Cell(40,40,"Te st Output");
$pdf->Output();
?>
Comment