ExtJS 4: Show Pdf In A Panel

Posted By Vitaliy | April 21, 2012 | ExtJS 4.0.7
0 8632
ExtJS 3 version of this post.

Note: you must have PDF plugin installed in your browser.

Js Code

Ext.widget('panel', {
	title: 'My PDF',
	width: 600,
	height: 400,
	items: {
		xtype: 'component',
		autoEl: {
			tag: 'iframe',
			style: 'height: 100%; width: 100%; border: none',
			src: '/files/pdf-sample.pdf'
		}
	},
	renderTo: Ext.getBody()
});
            

ExtJS 3: Show Pdf In A Panel

Posted By Vitaliy | April 21, 2012 | ExtJS 3.4.0
0 5278
Reply to thread

Note: you must have PDF plugin installed in your browser.

Js Code

Ext.create({
	title: 'My PDF',
	xtype: 'panel',
	width: 600,
	height: 400,
	items: {
		xtype: 'box',
		autoEl: {
			tag: 'iframe',
			style: 'height: 100%; width: 100%',
			src: '/files/pdf-sample.pdf'
		}
	},
	renderTo: Ext.getBody()
});