Reputation: 55
I am using html2canvas to convert the div into canvas. My DIV contain the table and each td contain the image. The canvas is getting successfully created but every image shows white space at the bottom of it.
Is there any other way to convert DIV into CANVAS?
Upvotes: 1
Views: 1755
Reputation: 55
Yes I got the solution, just style="display:block" for every image.
Upvotes: 1
Reputation: 105035
Yes, here's one alternative to using html2canvas to render all/part of a webpage.
You can use a "headless browser" on your server to capture a webpage into an image. A headless browser can render the contents of a webpage into an image without the security restrictions that apply to html2canvas.
I recommend PhantomJS because it uses Webkit and therefore delivers compatibility with modern browsers: http://phantomjs.org/screen-capture.html
Upvotes: 0