0

I have problem with link wkhtml with css from zurb fundation framework 5. I use laravel and in myhtml I have absolute url to css.

Pdf is ok but without layout from css.

Any ideas?

I tried also with local css in html file.

110precent
  • 322
  • 4
  • 19

2 Answers2

0

you can use helpers in your links

<link rel="stylesheet" type="text/css" 
href="{{public_path().'/assets/css/fo.css'}}" />
Razor
  • 9,577
  • 3
  • 36
  • 51
  • I'm not sure. But I'm afraid that zurb is not support by pdf converters. Because I tired also mPDF and dompdf. I have one problem. All div with class collumn and eg. large-4 are ignored and listed as block not inline. – 110precent May 30 '14 at 14:09
  • It's strange, because if I set url from any website css is imported. I added my html as url and in pdf is html but still without zurb columns import. – 110precent May 30 '14 at 14:25
  • 1
    I had the same problem with boostrap, I replace all class div with `.col-xs-`, I don't know about foundation but according to this post (http://stackoverflow.com/questions/20333666/how-to-accomplish-what-bootstrap-grid-system-does-with-its-col-xs-or-small) you may try with `small-`, some explanation here for bootstrap (http://stackoverflow.com/questions/19705880/converting-twitter-bootstrap-page-into-pdf-with-wkhtmltopdf-span-issue) – Razor May 30 '14 at 14:26
  • 1
    wkhtmltopdf didn't support css in @media block, and I think 'all' grid in foundation are inside @media block. So you need to write your "own" grid => just remove `@media` – Razor May 30 '14 at 14:37
  • thanks, you have right. It's media problem. I added .large and .column and works good. – 110precent May 31 '14 at 03:52
  • I added + to you comment. But I can't accept answer above because, someone can be confuse. – 110precent Jun 03 '14 at 09:49
0
  1. create css folder in " public " and put all css files in it.
  2. now to include css file use this :

    <link rel="stylesheet" type="text/css" href="{{ url('css/filename.css')}}" />

a-alrihawi
  • 21
  • 3