Nazar Hussain
Nazar Hussain

Reputation: 5162

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.

Upvotes: 9

Views: 4992

Answers (1)

Unixmonkey
Unixmonkey

Reputation: 18784

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.

Upvotes: 2

Related Questions