hello,
when I download a pdf file from internet it's displayed in the browser
window (acrobat plugin I guess renders it).
I'm using this qooxdoo code:
__openPopup : function(pageURL, title,w,h) {
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
var targetWin = window.open(pageURL,
title, 'toolbar=no, location=no,
directories=no, status=no, menubar=no, scrollbars=auto, resizable=no,
copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
if (window.focus) {targetWin.focus()};
return targetWin;
},
__generatePDF : function(html){
var url =
"http://127.0.0.1/myProject/build/gen_pdf.php";
var req = new qx.io.request.Xhr(url);
req.setMethod('POST');
req.setRequestData(html);
req.addListener("success", function(e) {
var req = e.getTarget();
var win =
this.__openPopup("report.html", "name", 600, 500);
win.document.write(req.getResponse()); //!! here's the problem I
guess
alert(req.getResponseContentType());
//display application/pdf
}, this);
req.send();
}
The problem is that the browser window display the source code of the pdf
instead of the pdf it self, someting like: %PDF-1.3 1 0 obj << /Type
/Catalog /Outlines 2 0 R /Pages 3 0 R /OpenAction 8 0 R >> endobj 2 0 obj <<
/Type /Outlines /Count 0 >> endobj 3 0 obj << .........
Any help?
Regards
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/How-to-send-HUGE-amount-of-data-and-get-back-a-file-tp7235246p7236445.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel