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

标签 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();

我在下面插入 Deamon 的代码后得到的 View !

enter image description here

最佳答案

试试这个:

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();

关于pdf - 如何在 ext.window 中显示 pdf 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18379290/

相关文章:

javascript - 需要根据操作系统修改PDF内的链接目标

java - 更改 Flying Saucer 标题

javascript - 如何在 Extjs 4.0 中突出显示鼠标悬停时的网格?

javascript - Extjs - 可调整浏览器大小的面板

ExtJS 主题集中化

javascript - 如何获取documentFragment中的子节点?

java - 使用 JasperReports 创建具有样式的 Excel

javascript - 下载pdf.js中base64生成的pdf

PHP:通过从数据库获取数据生成PDF

本地数据的 Extjs 网格面板性能问题