TCPDF: Rotate Text / Cell in Table Header

Thorsten picture Thorsten · Jul 20, 2011 · Viewed 30.1k times · Source

I have some trouble with creating a table in TCPDF in which all header columns, except the first and last, should be rotated by 90 degrees (or: the text in that cells should be vertical).

Is there a way to rotate just the test within a cell, not the complete cell itself?

I want the table to look like this:

enter image description here

Thanks for your help.

Answer

Sumod Nair picture Sumod Nair · May 15, 2013

It's simple one, Please check the following code.

$pdf->StartTransform();
$pdf->Rotate(-90);
$pdf->Cell(0,0,'This is a sample data',1,1,'L',0,'');
$pdf->StopTransform();