本文介绍了如何在ext.window中显示pdf文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
var win = new Ext.Window({
title: 'PDF内容',
宽度:400,
高度:600,
最大化:true,
布局:'fit',
plain:true,
items:{//让我们放一个空格,只是为了说明合适的布局
xtype:'component',
autoEl:{
tag:iframe,
src:../../../resources/august2013.pdf
}
}
// items:[{
// html:'< ; object width =1 00%height =100%data =../../../ resources / august2013.pdf>< / object>'
//}]
})
win.show();
此视图我从Deamon插入下面的代码后,我收到了
解决方案
尝试这样:
var win = Ext.create('Ext.window。窗口'{
title:'PDF Content',
width:400,
height:600,
modal:true,
closeAction:'hide',
items:[{
xtype:'component',
html:'< iframe src =../../../ resources / august2013.pdfwidth =100% height =100%>< / iframe>',
}]
});
win.show();
it doesnt work, what is wrong?
var win = new Ext.Window({
title: 'PDF Content',
width: 400,
height: 600,
maximizable : true,
layout : 'fit',
plain: true,
items: { // Let's put an empty grid in just to illustrate fit layout
xtype: 'component',
autoEl: {
tag: "iframe",
src: "../../../resources/august2013.pdf"
}
}
//items : [ {
// html: '<object width="100%" height="100%" data="../../../resources/august2013.pdf"></object>'
//} ]
})
win.show();
this VIEW I am getting after inserting code below from Deamon!
解决方案
Try this :
var win = Ext.create('Ext.window.Window' {
title: 'PDF Content',
width: 400,
height: 600,
modal : true,
closeAction: 'hide',
items: [{
xtype: 'component',
html : '<iframe src="../../../resources/august2013.pdf" width="100%" height="100%"></iframe>',
}]
});
win.show();
这篇关于如何在ext.window中显示pdf文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!