khtml2canvas
Version 0.4.1r2
Published on 18 September 2013 by 
Created on 11 September 2013
Details
The script allows you to take "screenshots" of webpages or parts of it, directly on the users browser.
Read More
JavaScript HTML renderer

The script allows you to take "screenshots" of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM and as such may not be 100% accurate to the real representation as it does not make an actual screenshot, but builds the screenshot based on the information available on the page.

How does it work?

The script renders the current page as a canvas image, by reading the DOM and the different styles applied to the elements.

It does not require any rendering from the server, as the whole image is created on the clients browser. However, as it is heavily dependent on the browser, this library is not suitable to be used in nodejs. It doesn't magically circumvent any browser content policy restrictions either, so rendering cross-origin content will require a proxy to get the content to the same origin.

The script is still in a very experimental state, so I don't recommend using it in a production environment nor start building applications with it yet, as there will be still major changes made.

Browser compatibility

The script should work fine on the following browsers:

  • Firefox 3.5+
  • Google Chrome
  • Opera 12+
  • IE9+
  • Safari 6+

As each CSS property needs to be manually built to be supported, there are a number of properties that are not yet supported.

Original project page: niklasvh/html2canvas


What’s new (0.4.1r2)
Added Features
  • Now it's possible to save canvas to disk as image.

Dependencies added:
/* Blob.js
* A Blob implementation.
* 2013-06-20
*
* By Eli Grey, http://eligrey.com
* By Devin Samarin, https://github.com/eboyjr
* License: X11/MIT
* See LICENSE.md
*/
/* canvas-toBlob.js 
 * A canvas.toBlob() implementation. 
 * 2011-07-13 
 * 
 * By Eli Grey, http://eligrey.com and Devin Samarin, https://github.com/eboyjr 
 * License: X11/MIT * See LICENSE.md 
 */
/* FileSaver.js 
 * A saveAs() FileSaver implementation. 
 * 2013-01-23 
 * 
 * By Eli Grey, http://eligrey.com 
 * License: X11/MIT 
 * See LICENSE.md 
 */
Reviews (0)
Category
Support Options
This component is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from Miguel 'Kelter' Antunes who created this component.
Dependencies
khtml2canvas has no dependencies.
Requirements
Platform
8.0.0.0
Database
All
Stack
All
Component Consumers
khtml2canvas has no consumers.
Weekly Downloads 
Related Components
Electronic Canvas
Guilherme Pereira
Build your OutSystems architecture diagram digitally.
1943
jQuery Knob
Rafael Fantato
Canvas based; No png or jpg sprite; Touch, mouse and mousewheel, keyboard events. See more: http://anthonyterrien.com/knob/
Canvas2Image Plugin
Gonçalo Martins
PhoneGap / Cordova plugin for iOS to save the contents of an HTML canvas to the device's Photo Library.
More from Miguel 'Kelter' Antunes
Html2PdfConverter
Guilherme Pereira
Simple to use html to pdf/image converter. Based on wkhtmltopdf (https://wkhtmltopdf.org/)
5402
FileSystem
Paulo Almeida
Perform operations related to the file system, such as path string manipulation, creation and deletion of directories, reading and writing text/binary files, etc..
7183
Essentials
Essentials
A collection of reusable actions to help us stop reinventing the wheel.  Join the team and bring your own top reused actions to the community!
1658