I have created a invoice based html page which has a button. onclick of the button, the html page should be downloaded as a image. using javascript or jquery.
Asked
Active
Viewed 1,763 times
1 Answers
0
I don't expect this to be the best answer, but it seemed interesting enough to post.
Write an app (may be with PhantomJS) that opens up the desired HTML document, sizes the window properly, and takes a screen shot. Then, remove the borders of the image.
(OR)
HTML2Canvas exists to render HTML onto (which you can then use as an image). (This may be of some help after converting to canvas - how to save canvas as png image?)

Community
- 1
- 1

Anand Sudhanaboina
- 885
- 6
- 10
-
i have converted html to canvas using HTML2Canvas . but the image is appending in the html page . instead of appending, i need to save it in local server – Pratz09 Jun 03 '15 at 07:10
-