-
24 Nov 2010 4:58 PM #1
Loading PDF in Ext.Window
Loading PDF in Ext.Window
Where 'hisAmpPhyWin' is a Ext.Window instance.Code:I have a servlet that returns a PDF. What i trying do is loading the PDF to Ext.Window. Below is the sample source Ext.getCmp('hisAmpPhyWin').load( { url:'servlet/Servlet/', params: {xhtml:xhtmlData}, text: 'Loading PDF...', scripts: false });
The thing is its showing the PDF content (i mean ascii characters) not the actual PDF in the browser.
Please help to fix this issue.
-
25 Nov 2010 5:59 AM #2
try searching the forum for IFrameComponent or displaying pdf in extjs. I use an iframe to display pdf's
-
25 Nov 2010 6:08 AM #3Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
You could use:
Code:var win = new Ext.Window({ title: 'My PDF', bodyCfg: { tag: 'iframe', src: 'servlet/Servlet/?xhtml=' + encodeURIComponent(xhtmlData) } }).show();
-
25 Nov 2010 4:49 PM #4
-
18 Jan 2011 5:57 PM #5
Thanks, worked fine with IE/ Chrome/ Opera for Ext 3.3.1
With Safari 4.0.5 the PDF didn't appear.
Yet, if the window is resized after the PDF has downloaded it appears.
As a workaround I'm checking for Safari and using the embed tag and the PDF appears fine.
Any tips on how to make IFrames/ PDFs work with Safari?
Similar Threads
-
Open pdf file in an Ext window
By senacle in forum Ext 3.x: Help & DiscussionReplies: 6Last Post: 15 Nov 2010, 5:32 AM -
[OPEN-1432] Open pdf file in an Ext window - Bug under IE with iframe
By senacle in forum Ext 3.x: BugsReplies: 1Last Post: 15 Nov 2010, 5:27 AM -
Static PDF in Ext.Window
By walldorff in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 29 Jun 2010, 12:22 PM -
PDF file in Ext.Window?
By neerajnandwana in forum Ext 2.x: Help & DiscussionReplies: 14Last Post: 17 Jun 2010, 10:56 AM -
I can't see created pdf in a new window
By haydar in forum Ext GWT: DiscussionReplies: 0Last Post: 3 Nov 2009, 1:33 AM


Reply With Quote