Heroku gives the following advice for anyone using HyPDF to convert HTML to PDF:
Place your styles and scripts within <style> and <script> tags instead of loading them using <link> tag.
I am currently using the following:
= stylesheet_link_tag "print", :media => "print, screen, projection"
What is the Rails 3.2 code to generate the <style> equivalent with inline unlinked CSS?
(That is, with Rails, it automatically inserts all the CSS from /app/assets/stylesheets/print.scss into the HTML that it generates, instead of manually copying all these CSS into the content_tag and then saving the contents of this tag.)
Could not find anything in the API docs.
Thanks.
source share