Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Extjs 在sencha touch中创建PDF格式的视图_Extjs_Sencha Touch_Sencha Touch 2 - Fatal编程技术网

Extjs 在sencha touch中创建PDF格式的视图

Extjs 在sencha touch中创建PDF格式的视图,extjs,sencha-touch,sencha-touch-2,Extjs,Sencha Touch,Sencha Touch 2,我的要求是在用户点击createPDF按钮后,以PDF格式生成当前视图。使用 console.log(this.getMain().getActiveItem().renderElement.dom.innerHTML) 我可以得到整个HTML元素。现在我坚持以PDF格式生成视图。任何建议你都应该在谷歌上搜索pdf查看器 例如,如果您想在URL上查看PDF 您可以使用以下URL: 然后使用HTML对象标记并将url传递给“data”属性。在您的视图中以html的形式附加此文件 谢谢如果您在浏览

我的要求是在用户点击createPDF按钮后,以PDF格式生成当前视图。使用

console.log(this.getMain().getActiveItem().renderElement.dom.innerHTML)


我可以得到整个HTML元素。现在我坚持以PDF格式生成视图。任何建议

你都应该在谷歌上搜索pdf查看器

例如,如果您想在URL上查看PDF

您可以使用以下URL:

然后使用HTML对象标记并将url传递给“data”属性。在您的视图中以html的形式附加此文件


谢谢

如果您在浏览器中工作,您有两个选择(如果您在移动设备中工作,您应该使用inAppBrowser cordova插件)

1º使用mozilla pdf库:

使用pdfObject库时为2º:

这两个库都非常适合使用浏览器,但移动设备是另一个错误