Open PDF Using ExtJS

Posted by Nismeh under JavaScript on 9/27/2013 | Points: 10 | Views : 15698 | Status : [Member] | Replies : 6
Hi,

Any one can help me to open PDF file using ExtJS 3.4.0

IT KNOWLEDGE IS APPLIED KNOWLEDGE
So Just Do It



Responses

Posted by: Bandi on: 9/27/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
To show PDF file in Panel:
Ext.onReady(function () { 
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: 'output'
});
});

NOTE:you must have PDF plugin installed in your browser
http://ext4all.com/post/extjs-3-show-pdf-in-a-panel

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Nismeh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nismeh on: 9/27/2013 [Member] Starter | Points: 25

Up
0
Down
Buddy Its not workin. :(

IT KNOWLEDGE IS APPLIED KNOWLEDGE
So Just Do It

Nismeh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nismeh on: 9/27/2013 [Member] Starter | Points: 25

Up
0
Down
I am using 3.4.0 version. So I need accordingly

IT KNOWLEDGE IS APPLIED KNOWLEDGE
So Just Do It

Nismeh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nismeh on: 9/27/2013 [Member] Starter | Points: 25

Up
0
Down
Its done :)
function Query() {
new Ext.Window({
height: 600,
width: 700,
bodyCfg: {
tag: 'iframe',
src: 'PDFFiles/sdlc.pdf',
style: 'border: 0 none'
},
modal: true
}).show();
}

IT KNOWLEDGE IS APPLIED KNOWLEDGE
So Just Do It

Nismeh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Allemahesh on: 9/27/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
Dear Nimish,

Here is another way to open the pdf:-


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


Happy Coding,
If it helps you or directs U towards the solution, MARK IT AS ANSWER

Nismeh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Arronlee on: 12/25/2013 [Member] Starter | Points: 25

Up
0
Down
How about building PDF viewers to help read and open PDF files with the help of some manual tools which can be customized by users according to our own favors? I am testing about the related PDF reading projects( http://www.yiigo.com/guides/csharp/how-to-read-pdf.shtml ) these days. Do you have any ideas about it? Or any good suggestion? Thanks in advance.



Best regards,
Arron

Nismeh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response