JsPDF needs to be able to render HTML
We were going to use this excellent library at work, but dealing with the formatting was going to prove to be too time consuming. Instead we went with a server-side pdf library since it could render html to pdf. If JsPDF rendered html to pdf it would make this library super awesome :-)
See july 2012 commits 12f29d7c31 and 6e72e17353
https://github.com/willowsystems/jsPDF/commits/stable
This is "work-in-progress"
This is an awesome library. The HTML to PDF does not support tables and images as of now. Is there any plan to support it?
@nrsudhir User dvdotsenko (or [email protected]) - the person who wrote the the "fromHTML" plugin does NOT have any short or long-term plans to implement support for HTML tables or images for "fromHTML" plugin.
However, this being an open-source project, nothing stops anyone else from doing that.
Hi,
Pull requests for 'fromHTML' are welcome.
dvdotsenko's contributions are valuable and very much appreciated.
Kind regards, James
On 5 Sep 2012, at 01:06, "D. Dotsenko" [email protected] wrote:
@nrsudhir https://github.com/nrsudhir User dvdotsenko (or [email protected]) - the person who wrote the the "fromHTML" plugin does NOT have any short or long-term plans to implement support for HTML tables or images for "fromHTML" plugin.
However, this being an open-source project, nothing stops anyone else from doing that.
— Reply to this email directly or view it on GitHubhttps://github.com/MrRio/jsPDF/issues/28#issuecomment-8283450.
I'm planning to add these features in the future :)
The new "fromHTML" is a very nice feature. I found it easiest to render a very simple version in html that's hidden and print that version to html (as it struggled with my more involved html & css syntax - ie it seems to tokenize words in tables, putting a large tab where there are normally spaces).
Meanwhile, the new feature overall saved so much time (relative to reconstructing the entire page using doc.text commands) that I'm happily using it now - just a simple version that's just h1's and p's.
Nice work & thx.
The fromHTML cannot render images present in table.