PDFkit *.css stylesheets not being applied

后端 未结 1 1413
情歌与酒
情歌与酒 2021-01-02 15:59

I am trying to convert a html page that displays images from facebook cdn to pdf using pdfkit. I am using rails 4.2, pdfkit 0.6.2 and wkhtmltopdf-binary 0.9.9.3.

<         


        
相关标签:
1条回答
  • 2021-01-02 16:31

    Does Bootstrap work correctly for other pages in your application? -- The aim is to make sure that you configured the meta tags correctly to include the Bootstrap files, and that you are pointing to the Bootstrap files (which seem to be in /tmp?)

    Also, on what OS are you coding? May I recommend to substitute "#{Rails.root}/tmp/bootstrap.css" with Rails.root.join('tmp','bootstrap.css')

    Let me know if these help at all -- or not.

    0 讨论(0)
提交回复
热议问题