I need to take a screenshot of a webpage when a user creates a new "graph", and save it as a thumbnail for later.
How can I save a screenshot of the page?
Requirements:
- Take a screenshot of entire webpage, given a URL
- Must capture correct CSS (both inline and from external stylesheets)
- Must capture SVG, Canvas, or any other HTML element.
I'm really surprised that no libraries seem to meet these requirements. I've done a lot of research, so I'll be listing every library and which requirement it fails to meet.
Libraries (that don't meet all requirements):
- html2canvas - doesn't capture external CSS
- IMGkit - doesn't capture external CSS
- URL2PNG - $30 a month, and not sure it works.
- PhantomJS - requires Node.js