Reputation: 19688
I am trying to be able to allow users to generate content dynamically, and have that information be in a , and then allow that specific to be exportable to a pdf. I have got Joomla up and running (with the appropriate mySQL and ANT) locally with the Web2PDF extension, but how would I get those running on my domain (hosted by Dreamhost). Are there any other approaches you might recommend. The content is generated by JS and JQuery, and formatted with CSS and HTML.
Here, is the page I would like to allow download/export of pdf.
Other considerations:
Web2PDF generates a PDF on the entire content, (pulling the entire page's HTML, not just the specific <div>
.
Upvotes: 2
Views: 738
Reputation: 2666
PDFlib is the ticket. You'll want to set it up on your dreamhost server:
http://wiki.dreamhost.com/PDFlib
And then you'll want to setup an AJAX script to pass the dynamically generated content to a PHP script which returns the pdf file.
Here's for the PHP script: http://www.webmonkey.com/2010/02/generate_pdfs_dynamically_with_php/
The tricky part will be getting the PDF to download with ajax. You might be better to generate the PDF on the server and then dynamically present the user with a "click here to get the pdf" link taking them to the pdf file you generate.
Upvotes: 1