1

Hi all,

I am using the version 4.03 and all things goes fine with my test server(Windows Environment), but when I put it in the production server(Linux Environment) it is working fine sometimes and sometimes it gives me the table without any cell borders, colors and styles. I think there is a problem during creating the pdf file. I noticed that the difference between the first load(which is great) and the others for the same page is that the others have the full data but not styled!!!. Is there a problem in loading the CSS one time and unable to load it another time??

Can any one solve this problem or faced the same problem?

2

I solved the problem myself. The best way I deal with this problem is including the content of the CSS file inside my content_html before converting it to PDF.

the code is:

$content_html = "<style type='text/css'>".file_get_contents("css/pdfReport.css")."</style>".$content_html;

3

alimg (./2) :
I solved the problem myself. The best way I deal with this problem is including the content of the CSS file inside my content_html before converting it to PDF.

the code is:

$content_html = "<style type='text/css'>".file_get_contents("css/pdfReport.css")."</style>".$content_html;


Yes, I've found this is the best way to do it. Inline styles seem to be touchy, especially padding & margins, so I try to get everything in the css file.