1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
<?php
define('FPDF_FONTPATH','font/');
require('rotation.php');
class PDF extends PDF_Rotate
{
function Header()
{
//Affiche le filigrane
$this->SetFont('Arial','B',50);
$this->SetTextColor(255,192,203);
$this->RotatedText(35,190,'texte filigrane',45);
}
function RotatedText($x,$y,$txt,$angle)
{
//Rotation du texte autour de son origine
$this->Rotate($angle,$x,$y);
$this->Text($x,$y,$txt);
$this->Rotate(0);
}
}
$pdf=new PDF();
$pdf->Open();
$pdf->AddPage();
$pdf->SetFont('Arial','',12);
$txt="Bienvenue sur notre page ! ".
" xxxxxxxxxxxxxxxxxxxxxx".
"xxxxxxxxxxxxxxxxxxxxxxxxxxxx";
for($i=0;$i<20;$i++)
$pdf->MultiCell(0,5,$txt,0,'J');
$pdf->Output();
?> |
Partager