5

i designed the invoice using bootstrap css, i used tcpdf to design invoice. I called bootstrap css file but its not working, Kindly help me.. My coding is

$baseurl = "http://localhost/erp";
$html = '<style>'.file_get_contents($baseurl.'css/bootstrap.min.css').'</style>';
$html = '<style>'.file_get_contents($baseurl.'css/style.css').'</style>';
Mukhila Asokan
  • 641
  • 3
  • 11
  • 29

1 Answers1

3

First of all - Bootstrap use js scripts for working; As You understand, scripts could not be working in tcpdf file;
More than that - tcpdf not allowed all CSS attributes; I can't find supported css list in official documentation, but this can help;

Community
  • 1
  • 1
user3335966
  • 2,673
  • 4
  • 30
  • 33
  • 1
    thank you for your information. Now I used **dompdf**. It supported CSS files. But here also i faced the same problem – Mukhila Asokan Sep 10 '15 at 05:10
  • @sathish I dnt work with `dompdf`, and if [this](http://stackoverflow.com/questions/17185531/dompdf-doesnt-work-with-external-css-file/17186282#17186282) not help You, then, in my opinion, problem in bootstrap =) Try copy needful class code from `bootstrap.css` to Your `php` code. – user3335966 Sep 10 '15 at 06:15