php - how can I center my text on fpdf -
i have finding on internet how center text on fpdf or 1 way center text didnt find it. way it's title need center
<?php require('../fpdf/fpdf.php'); class ticket extends fpdf{ private $conexion; public function __construct(){ require_once('../model/conexion.php'); parent::__construct(); $this->conexion = new conexion(); $this->conexion->conectar(); } } $pdf = new fpdf('p','mm',array(114,76)); $pdf->addpage(); $pdf->setfont('arial','',10); $pdf->cell(0,0,'storelte'); $pdf->ln(2); $pdf->output('test.pdf', 'i'); ?>
the cell
method includes optional var alignment http://www.fpdf.org/en/doc/cell.htm
you can include additional options variables , define alignment center.
$pdf->cell(0,0,'storelte',0,1,'c');
Comments
Post a Comment