html2canvas icon indicating copy to clipboard operation
html2canvas copied to clipboard

nodejs backend-end support.

Open NStal opened this issue 14 years ago • 3 comments

Nodejs already support some DOM/canvas simulation. I found this feature very useful and interesting to rendering some images with text using html/css at backend .Will nodejs backend support be considered in future release ?

NStal avatar Sep 14 '12 08:09 NStal

I really doubt nodejs supports some of the more crucial DOM functions such as element.getBoundingClientRect. Without them, it would be impossible to make html2canvas run. Besides, if you are interested in doing rendering on server side, phantomjs for example probably would be more suitable.

niklasvh avatar Sep 14 '12 09:09 niklasvh

@niklasvh It's been over 7 years since this issue was closed. Do you think it's possible that node now has better support for things like getBoundingClientRect that might make it worth revisiting this issue? I'd like to be able to render a react component on the server and generate a jpg, on demand. (We are building an integration with something that will display text and images, but not html.) Phantomjs may be the next best option, but I'd rather render something to the canvas and output that as an image, than to rely on browser and screenshots. Thanks in advance for your time.

JohnDMathis avatar May 09 '19 16:05 JohnDMathis

I would highly recommend using a real browser if you intend to be rendering something on the server. Additionally, I don't think there are any node libraries that would do full layout similarly to that of getBoundingClientRect

niklasvh avatar May 10 '19 02:05 niklasvh