View Full Version : Pdf generator
06-17-2009, 01:36 PM
06-17-2009, 01:59 PM
06-17-2009, 08:04 PM
yes it is, in some browsers.
You can use XSL FO to create PDFs from HTML/XML data.
it would be available to all users if you did it on the server though...
06-17-2009, 11:12 PM
Displaying it as a PDF file to the user may be an issue.
But because it is a file format separate from HTML, the browser views it is through a URL, or as an embedded object.
Taking the PDF source you've generated and passing it to the embed, or linking it to a URL is what you have to figure out.
You cannot do this via sending the browser to a URL:
window.loaction = 'mypdf_file_url';
mainly because you cannot generate that URL from the client side.
You can however use a data URI: http://en.wikipedia.org/wiki/Data_URI_scheme
You could use window.open() or window.write() to write the data to the window.
I'm sure you can find other ways of doing it.
Though this is server side, it will work on the client side with modifications. On the server side, it is easy to display the PDF, or intiate a download, since you can do it through the HTTP Specifications.
On the client side, you cannot initiate a HTTP request to yourself, so you'll have to use other protocols described above.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.