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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
| class PDF extends FPDF
{
// En-tête
function Header()
{
// Logo
$this->Image('img/transparent-web.png',85,6,50);
// Police Arial gras 15
$this->SetFont('Arial','B',15);
// Décalage à droite
$this->Cell(150);
// Titre
//$this->Cell(70,60,'Mould Specification Sheet',1,0,'');
// Saut de ligne
$this->Ln(10);
}
// Pied de page
function Footer()
{
// Positionnement à 1,5 cm du bas
$this->SetY(-15);
// Police Arial italique 8
$this->SetFont('Arial','I',8);
// Numéro de page
$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
}
}
//requete
$demande=$mysqli -> query("SELECT * FROM mould WHERE id_mould=$id_mould");
$row = $query ->fetch_array();
//instantation
$pdf = new pdf('P','mm','A4');
//créa de la page
$pdf->AddPage();
//police couleur
$pdf->SetFont('Arial','B',13);
$pdf->SetDrawColor(0,0,0);
//titre
//$pdf->Cell(60);
$pdf->SetFillColor(252,104,26);
$pdf->Cell(75,10,"MOULD SPECIFICATION SHEET ",0,1,'L',true);
$pdf->Ln(10);
$pdf->SetFillColor(252,104,26);
$pdf->Cell(40,10,"TOOL NUMBER : ",0,0,'L',false);
$pdf->SetTextColor(252,104,26);
$pdf->SetDrawColor(252,104,26);
$pdf->Cell(50,10," ".$row['tool_number']."",0,0,'L',false);
$pdf->Ln(10);
//tableau
$pdf->SetFont('Arial','',12);
$pdf->SetFillColor(255,255,255);
$pdf->SetDrawColor(252,104,26);
$pdf->SetTextColor(252,104,26);
$pdf->Cell(0,10,"Mold Registration(模具登记)",1,0,'C',true);
$pdf->Ln(10);
$pdf->SetFont('Arial','',12);
$pdf->SetFillColor(255,255,255);
$pdf->SetDrawColor(252,104,26);
$pdf->SetTextColor(0,0,0);
//$pdf->Cell(100,10,"- Tool number : ".$row['tool_number']."",0,0,'c',false,);
$pdf->Cell(100,10,"- Type(类型) : ".$row['type']."",0,0,'L',false); |
Partager