paramQuery grid to pdf
paramQuery grid to pdf
是否可以将paramQuery网格导出为pdf,或者我该怎么做?这就是我创建网格的方式,我想在pdf文件中显示这个网格
createGrid = function(){
var obj = {
width:"100%",
height : "100%" ,
title : "grid" ,
flexHeight : false ,
resizable : false ,
draggable : false ,
scrollModel: {scrollTillLastRow:false, scrollTillLastColumn:true},
numberCell : true,
} ;
obj.colModel = [
{
title : "Date" ,
width : 200 ,
dataType : "string" ,
dataIndx : "Date"
} ,
{
title : "Name" ,
width : 200, dataType : "string" ,
dataIndx : "Name"
}
] ;
obj.dataModel = {
data : lstData //this is the object with the information
} ;
obj.width = "460px";
obj.height = "300px";
var $grid = $ ( "#grid_json" ).pqGrid ( obj ) ;
}
{
type: 'select',
label: 'Format: ',
attr: 'id="export_format" style= "padding: 5% 0"',
options: [{
xlsx: 'Excel',
csv: 'Csv',
htm: 'Html',
json: 'Json',
pdf: 'pdf'
}]
},
{
type: 'button',
label: "Export",
icon: 'ui-icon-arrowthickstop-1-s',
listener: function () {
var format = $("#export_format").val(),
blob = this.exportData({
format: format,
render: true
});
if (typeof blob === "string") {
blob = new Blob([blob]);
}
saveAs(blob, "Cost Modeler." + format);
}
}
您只需要在工具栏项目中包含此代码
相关文章:
- 如何使用javascript或html下载PDF格式的填写表单
- 节点Js:How to catch a“;没有这样的文件或目录“;读取线模块出错
- 如何将PDF作为二进制文件传递到window.open()
- javascript.点击显示嵌入的pdf
- jQuery AJAX write to XML
- Javascript/Jquery Blob not showing Chrome PDF
- 在提交时打开thankyou.html+下载PDF
- 生成pdf或其他非html文件时的错误处理
- grep in JQuery to C#
- how to convert html <div> to pdf
- Node.js - POST to iFrame?
- SVG xml to image
- Advantages to DOMParser vs template & innerHTML
- Javascript window.print() defaults to PDF
- HTML5 canvas to PDF
- paramQuery grid to pdf
- AngularJS export SVG to PDF
- dynamic PDF v/s HTML to PDF
- js print to PDF只打印第一张幻灯片
- Html to pdf Jspdf