到目前为止,我的 Rorativa(最新稳定版本 - 1.6.1)在我的 MVC 项目中运行良好。
我的代码最初是
return new Rotativa.ActionAsPdf(string.Format("PrintPage/{0}", id));
我得到了我的页面的一个不错的快乐 pdf 版本
但是现在我想做一些更高级的东西,所以我这样做了
return new Rotativa.ActionAsPdf(string.Format("PrintPage/{0}", id))
{
CustomSwitches = "--print-media-type --footer-html " + Url.Action("Footer",id)
};
然后当我这样做时,我得到了这个错误
Qt: Untested Windows version 6.2 detected!
QMetaObject::invokeMethod: No such method WebCore::SocketStreamHandlePrivate::socketSentData()
Error: Failed loading page http:///Invoice/Footer?page=1§ion=Account Queries VAT No.
0&title=Ben Dover-Invoice No:
A0120852&subsection=MATERIALS&frompage=1&subsubsection=&topage=2&doctitle=Ben Dover-Invoice No:
A0120852&webpage=http://localhost:2066/Invoice/PrintPage/386&time=01:01:59 PM&date=2015/01/06
(sometimes it will work just to ignore this error with --load-error-handling ignore)
Error: Failed loading page http:///Invoice/Footer?page=2§ion=Account Queries VAT No.
0&title=Ben Dover-Invoice No: A0120852&subsection=TOTAL R
1á850.70&frompage=1&subsubsection=&topage=2&doctitle=Ben Dover-Invoice No:
A0120852&webpage=http://localhost:2066/Invoice/PrintPage/386&time=01:01:59 PM&date=2015/01/06
(sometimes it will work just to ignore this error with --load-error-handling ignore)
QPaintDevice: Cannot destroy paint device that is being painted
pure virtual method called
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
terminate called without an active exception
我尝试遵循建议并添加 --load-error-handling ignore 这删除了错误,但我的页脚没有加载