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

r.r*_*r.r 2 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: 'component',
        autoEl: {
            tag: "iframe",
            src: "../../../resources/august2013.pdf"
        }
    }
    //items : [ {
    //    html: '<object width="100%" height="100%" data="../../../resources/august2013.pdf"></object>'
    //} ]
})
win.show();
Run Code Online (Sandbox Code Playgroud)

我在下面插入代码后得到的这个视图Deamon!

在此输入图像描述

Dev*_*Dev 6

试试这个 :

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();
Run Code Online (Sandbox Code Playgroud)