Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.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
如何在ext.window中显示pdf文件?_Pdf_Extjs - Fatal编程技术网

如何在ext.window中显示pdf文件?

如何在ext.window中显示pdf文件?,pdf,extjs,Pdf,Extjs,没用,怎么了 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: 'componen

没用,怎么了

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();
var-win=新的外部窗口({
标题:“PDF内容”,
宽度:400,
身高:600,
最大化:是的,
布局:“适合”,
朴素:没错,
items:{//让我们在其中放置一个空网格,以演示fit布局
xtype:'组件',
autoEl:{
标签:“iframe”,
src:“../../../resources/august2013.pdf”
}
}
//项目:[{
//html:'
//} ]
})
win.show();
我从
Deamon
插入下面的代码后得到了这个视图

试试这个:

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();
var win=Ext.create('Ext.window.window'{
标题:“PDF内容”,
宽度:400,
身高:600,
莫代尔:是的,
closeAction:'隐藏',
项目:[{
xtype:'组件',
html:“”,
}]
});
win.show();

看看上面我在使用你的代码后得到了什么,你知道为什么PDF仍然没有显示吗?@Ragims它对我有效。我想问题可能是你的PDF。你有什么错误吗?我可以在这个窗口中也显示图像来测试它吗?我只需要更改html:'',像这样还是?你的意思是说,你想通过显示图像来测试它。是的,你可以测试我,它可以工作。请验证url。你应该在你的war中有你的图像或pdf或其他内容。不要编辑与用户答案相关的问题。保持原样,就像以前一样。我想给守护进程和其他用户显示一个图像!有什么想法可以在评论中这样做吗?@RagimsRagimovs至少可以适当地标记您的添加内容,例如通过前面的编辑:或类似的方式。