Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wicked_pdf does not include styles

I used <%= wicked_pdf_stylesheet_link_tag "pdf" %> it shows the following output in the html

<link href="/stylesheets/pdf.css?1302860585" media="screen" rel="stylesheet" type="text/css"> <link href="file:///home/likewise-open/NEXTBRIDGE/nazar.hussain/osd/development/atlantis/public/stylesheets/pdf" media="screen" rel="stylesheet" type="text/css">

But when create the pdf it do not have any style. If i copy all css from the file to the header of the page, it includes all styles. What is the issue and how to solve it.

like image 662
Nazar Hussain Avatar asked Apr 15 '11 10:04

Nazar Hussain


1 Answers

I personally haven't had any trouble with this method, but I've seen others that have.

I just pushed some updates to the main project that should resolve this issue for you.

wicked_pdf_stylesheet_link_tag now will inline any css files passed in directly into the markup.

I also updated the Github issue you created.

like image 190
Unixmonkey Avatar answered Sep 28 '22 03:09

Unixmonkey