PDF Inline HTML working but not CSS background-color

Phoca PDF - creating PDF documents in Joomla! CMS
joshuatan17
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 07 May 2015, 10:14

PDF Inline HTML working but not CSS background-color

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
Post Reply