tecnickcom / TCPDF

Official clone of PHP library to generate PDF documents and barcodes
https://tcpdf.org
Other
4.21k stars 1.52k forks source link

Rotate text in table - HTML #384

Open michalfordonski opened 3 years ago

michalfordonski commented 3 years ago

Hi, How can I rotate the text 90 degrees in HTML so that TCPDF will do it correctly? Using styles: transform: rotate(-90.0deg); unfortunately it doesn't work, a

'<tcpdf method="StartTransform"/><tcpdf method="Rotate" params="'.$pdf->serializeTCPDFtagParameters(array(90)).'"/>Text To Rotate<tcpdf method="StopTransform"/>'

sets the text outside the table cell.

My HTML code: <table style="text-align:left; border-width:0.4px;" cellspacing="0" cellpadding="1"> <tr> <td valign="center" style="width: 5%"><tcpdf method="StartTransform"/><tcpdf method="Rotate" params="'.$pdf->serializeTCPDFtagParameters(array(90)).'"/>Text To Rotate<tcpdf method="StopTransform"/></td> <td valign="top" style="width: 90%"> MyContent </td> <td valign="center" style="width: 5%"></td> </tr> </table>

tipleavalentin commented 2 years ago

Hi! Did anyone found a solution for this? Thanks!

michalfordonski commented 2 years ago

I haven't found a solution. I changed to mPDF