阅读背景:

如何使用nodeJS中的幻像包设置自定义页眉和页脚内容?

来源:互联网 

Actually, I am working with generating pdf reports using phantom package in nodeJS. I've found that we can use phantom.callback method for setting it. But I have a problem that when this callback returns simple text it works fine, but when I try to use complicated function which use closures and jade engine for generating html I have error in phantom output that jade variable is not defined, I think this problem was occurred because callback which is mentioned about work in context of child phantom process, therefore all variables which are defined in my code in that callback don't work. So, how can I solve this issue? Maybe you know better phantomJS wrapper for doing this stuff? I use this package Actually, I am working with generating pdf repo




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: