PDF writeHTML for rendering tables
- by sami
I'm using TCPDF and following this example which uses writeHTML and heredoc syntax to write a table.
http://www.tcpdf.org/examples/example_048.phps
I'm trying to do though is switch the font using setFont before writing each column. This means I have to break the html and write it on different pieces (see pseudo code). But once I break the HTML like that, it doesn't work, I think because it becomes invalid.
writeHTML <tr>
writeHTML first column
setFont()
writeHTML second column
writeHTML </tr>
I want to use writeHTML because it helps me write the table without having to manually construct. But how can I make modifications before I output each cell?