I\'ve this simple script that write some text into a PDF trought the php library TCPDF. This is the script:
// create new PDF document
$pdf = new TCPDF(PDF_PAGE
Option 1: If you want to use Cell
The prototype is:
//Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
To deal with spacing, use these:
$pdf->Cell(0, 0, 'TEST CELL STRETCH: spacing', 1, 1, 'C', 0, '', 3);
$pdf->Cell(0, 0, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', 4);
You can try this:
$label="Hello world, i'm michele";
$pdf->Cell(0, 0 , $label, 1, 1, 'C', 0, '', 3;
The border is on, so that you can see if the cell is large enough. Hope this works. (for indication, what follows : FALSE,'T','M' are already the values by default)
Option 2: You can also use Write()
$pdf->AddPage();
// set some text to print
$label = <<<EOD
About Michele.
Michele is awesome.
EOD;
// print a block of text using Write()
$pdf->Write($h=0, $label, $link='', $fill=0, $align='C', $ln=true, $stretch=0, $firstline=false, $firstblock=false, $maxh=0);
You can find plenty of examples there: TCPDF examples
I believe the problem lies with the "times" font. I had the same problems with that particular font. You can try some of the other fonts in the tcpdf fonts directory.
I've resolved, the problem is a bug with the browser's PDF plug-in visualizer!!