Welcome Guest Search | Active Topics | Sign In | Register

EO.PDF output stream with AJAX Options
Mike
Posted: Friday, September 9, 2011 6:13:15 PM
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?
eo_support
Posted: Friday, September 9, 2011 6:23:00 PM
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
Mike
Posted: Friday, September 9, 2011 6:29:01 PM
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!
eo_support
Posted: Friday, September 9, 2011 6:35:38 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Yeah. That will work too.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.