如何打印EXT窗口中的内容
'-', {
xtype: 'button',
icon: 'static/images/btnimg/tongji.png',
height: 20,
width: 60,
action: 'print',
text: '打印',
handler: function(){
var win = Ext.getCmp("logoPic4");
var c = win.body.first().dom.innerHTML;
var printer = win.body.last().dom.contentWindow;
printer.document.body.innerHTML = c;
printer.print();
}
},
'-',
要打印的内容:
Ext.applyIf(me, {
items: [{
xtype: 'panel',
region: 'center',
layout: 'fit',
tbar: wrmpbtbar,
items: [{
xtype: 'box',
id: 'logoPic4',
width: 900,
height: 500,
autoEl: {
tag: 'img',
width: 900,
height: 500,
style: 'border-width: 0px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);'
}
}]
}]
});
me.callParent(arguments);
extjs
------解决方案--------------------
用 applet 调用 js 拿到数据,然后打印