|
Rank: Member Groups: Member
Joined: 8/24/2011 Posts: 10
|
I am using AJAX through JQuery that, in theory, will create a PDF using EO.PDF and stream it back to the user, as opposed to saving it to a file.
However, when the AJAX is completed, the PDF is not opened, but I can see the data in Firebug. So I know the data is returned, but its not showing the PDF.
Ideas?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I don't think you can AJAX the PDF file. When you use AJAX, the request/response goes through a second "channel" that does not associate to a browser window. Normally it's the AJAX code in your browser window (for example, in this case JQuery) that interprets whatever returned from this second channel (usually the new HTML output), then updates contents in your browser window to presents the update to you. Obviously the AJAX code would not know how to "interprets" or "present" a PDF file. To avoid the problem, you simply skip AJAXs for the control that triggers the PDF generating code.
Thanks
|
|
Rank: Member Groups: Member
Joined: 8/24/2011 Posts: 10
|
Come to think of it, in other applications, we use a handler page that generates an on-demand PDF for something. I guess I'll just go about it that way.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Yeah. That will work too.
|
|