简体   繁体   English

带有外部 css 文件的 jsreport

[英]jsreport with external css file

I'm using jsreport to render my html files to pdf.我正在使用jsreport将我的 html 文件呈现为 pdf。 In these files, I refer to external css files.在这些文件中,我指的是外部 css 文件。 But it looks like that the phantom js doesn't like it and the css styling is not applied.但是看起来幻象js不喜欢它,并且没有应用css样式。
Any reason or idea on how to fix this problem?有关如何解决此问题的任何原因或想法?

Please check following:请检查以下内容:

  • is it working when you switch to html recipe?当你切换到 html recipe 时它工作吗?
  • is it a full absolute path to the external css?它是外部css的完整绝对路径吗?
  • isn't the css behind some authentication and your browser just has valid cookie which phantomjs doesn't?是不是某些身份验证背后的 css 和您的浏览器只有 phantomjs 没有的有效 cookie?
  • isn't the css served over https? css 不是通过 https 提供的吗? this should work, but could be a problem in some minor circumstances这应该可行,但在某些小情况下可能会出现问题

Here you see it works in playground: https://playground.jsreport.net/#playground/bkHyoe7fle/3在这里你可以看到它在操场上工作: https : //playground.jsreport.net/#playground/bkHyoe7fle/3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM