Page 1 of 1

PDF Inline HTML working but not CSS background-color

Posted: 07 May 2015, 10:23
by joshuatan17
Hi there,

I am new to Phoca PDF. I'd tried searching the forum but can't find this topic.

I'm trying to print an article where there are HTML tables. There are different background-color for different cells (td). When I tried with CSS background-color, it doesn't appear in the generated PDF. But if I use td inline style for background-color it works.

Please guide me to make the CSS background-color work.

Also, the tables are 'responsive' on a bootstrap template. I use percentage for td while using pixels for table height and width. When the PDF is generated, the tables become small size. How do I specify the measurements?

Thank you!

Re: PDF Inline HTML working but not CSS background-color

Posted: 07 May 2015, 22:39
by Jan
Hi, see: https://www.phoca.cz/phocapdf - the red box.

PDF is static document and HTML is dynamic document it is really difficult procedure to change the html to PDF and some features cannot be translated.

1) background-color - this seems like in TCPDF library used in Phoca PDF, there is no support for external style and attribute background-color in table, so this needs to be set in inline style :-(

2) For this you need to look at the TCPDF class and chek how it translates responsive (not fixed size) cells to fixed size cells :idea:

Jan