I'm trying to use TCPDF with my own classes to publish some content that is already existing in HTML and I can't get the CSS to play ball (not completely anyway).
I know it's a pDF library and doesn't handle all CSS, but all I'm doing is some (very) basic formatting.
I'm probably doing something really stupid, but for the life of me I can't see it.
Anyway, I'm creating a variable with the style attributes in it like this:
$html = <<<EOF
<style>
table.phonelist {
border:1px solid black;
}
td {
border:1px solid black;
}
td.header1 {
background-color: #cccccc;
border-bottom:1px solid black;
font-weight: bold;
text-align: center;
font-size: 12pt;
}
td.header2 {
font-weight:bold;
text-align:center;
font-size:12pt;
}
td.lname {
font-weight:bold;
}
td.ext {
text-align:center;
}
</style>
EOF;
Then I add some html onto the end of that string and write it out to the page, the HTML renders fine and SOME of the styles, for instance the header1 style is the larger font size and centered, but the background-color doesn't seem to do antything.
Anyone can be of any help it would be great, if it is just pointing out my stupidity then would still work :-)
Cheers.