Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-05-2011, 06:13 PM   PM User | #1
concealed
New to the CF scene

 
Join Date: Jan 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
concealed is an unknown quantity at this point
open a file created in JS

I've been watching an application called JSPDF http://code.google.com/p/jspdf/ that creates a PDF file solely in client side javascript.
In a nutshell, it generates pdf bytes (called buffer), encodes the bytes into base64, and opens it in the browser:
Code:
document.location.href = 'data:application/pdf;base64,' + Base64.encode(buffer);
This works for me in firefox and chrome, but not IE. My question: is there a better way to reform the file download/opening in javascript? They provide an example with downloadify and that may be acceptable unless you are trying to eliminate flash from the equation.

Thanks

Last edited by concealed; 01-05-2011 at 06:26 PM..
concealed is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:11 AM.


Advertisement
Log in to turn off these ads.