mein problem ich will das auf jeder seite ( bei mehrseitigen pdf-docs ) ein logo auftaucht. in der doko von fpdf wird diese variante vorgeschlagen,
funktioniert leider nicht
zitat : This method is used to render the page header. It is automatically called by AddPage() and should not be called directly by the application. The implementation in FPDF is empty, so you have to subclass it and override the method if you want a specific processing.
wenn ich direkt in der header() editiere, dann gehts.
leider will ich nun die ganze sache dynamisch gestalten, also verschiedene pdf-docs mit verschiedenen logos.
jetzt wirds schwierig, wie kann ich das steuern. die gesamte classe umschreiben?
oder vererben und umschreiben ?
funktioniert leider nicht
zitat : This method is used to render the page header. It is automatically called by AddPage() and should not be called directly by the application. The implementation in FPDF is empty, so you have to subclass it and override the method if you want a specific processing.
PHP-Code:
class PDF extends FPDF
{
function Header()
{
//Select Arial bold 15
$this->SetFont('Arial','B',15);
//Move to the right
$this->Cell(80);
//Framed title
$this->Cell(30,10,'Title',1,0,'C');
//Line break
$this->Ln(20);
}
}
leider will ich nun die ganze sache dynamisch gestalten, also verschiedene pdf-docs mit verschiedenen logos.
jetzt wirds schwierig, wie kann ich das steuern. die gesamte classe umschreiben?
oder vererben und umschreiben ?

Kommentar