我有 Html 页面包含表格和 OpenLayers 地图在所有浏览器甚至 IE 上一切正常。我想将此页面转换为 pdf,所以我使用 wkhtmltopdf 并在阅读 wkhtmltopdf 时使用幕后 WebKit 呈现页面,因此我在Qt Web 浏览器上测试输出,由于错误,浏览器拒绝显示 OpenLayers 地图
ol-debug.js:18601ReferenceError: Can't find variable: requestAnimationFrame
ol.PluggableMap.prototype.render = function() {
if (this.animationDelayKey_ === undefined) {
this.animationDelayKey_ = requestAnimationFrame(
this.animationDelay_);
}
};
因为这个错误 wkhtmltopdf 只转换 Html 表并忽略地图
Ps:我使用这些命令进行转换
wkhtmltopdf.exe --enable-javascript --no-stop-slow-scripts --javascript-delay 2000 --debug-javascript
有关此问题的解决方法的任何想法或建议
在此先感谢您的帮助