Hi,
I have a page with a print button. When I click that button, a pdf is generated
by CF and sent to the client using cfdocument, mime-type application/pdf and a
header content-disposition so that the pdf is treated as an atachment. That
works fine if I don't use Ajax. But I can't get this
Hi,
I have a page with a print button. When I click that button, a pdf is generated
by CF and sent to the client using cfdocument, mime-type application/pdf and a
header content-disposition so that the pdf is treated as an atachment. That
works fine if I don't use Ajax. But I can't get this
I just see that the Ajax call is getting the pdf data - if I do an alert(data)
in the onSucess callback I get the binary data. Question is how to display this
binary data
~|
Order the Adobe Coldfusion Anthology now!
I don't believe what you want to do is possible. A plugin is used to
display PDF data. You can't simply tell the plugin to render arbitrary
binary data via JS. I'd recommend modifying your JS so that it moves
the window to a location (new url) that serves up the PDF.
On Mon, Dec 27, 2010 at 4:56
You can't download files like that via AJAX. What you can do, and what
I've done in the past, is use an iframe to push the download to the
browser.
In the past I've used AJAX to check the server to see if the
downloadable file is ready for download. I do this by creating a
unique download token
5 matches
Mail list logo