-2

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.

alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
Pratz09
  • 1
  • 3

1 Answers1

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