khtml2canvas

Version 0.4.1r2 (OutSystems 8)
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



Like my components? Buy me a beer :) and support my work.

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
UI & Widgets, Developer Tools
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
No consumers yet.
Weekly Downloads 
Related Components
Silk UI Web
OutSystems R&D
A fully responsive and beautiful UI framework that works within the OutSystems Platform. Build amazing looking applications, in a fraction of the time, which work perfectly across devices. Learn how to start using Silk UI and see the examples at silkui.outsystems.com . Obtain assistance on using Silk UI in our forums .
28488
Discovery
Architecture Team
A tool to discover and measure your architecture and understand how to improve
3465
OutSystems Now
OutSystems R&D
OutSystems Now brings your OutSystems experience to any device.
9154
More from Miguel 'Kelter' Antunes
Html2PdfConverter
Guilherme Pereira
Simple to use html to pdf/image converter. Based on wkhtmltopdf (https://wkhtmltopdf.org/)
6129
Google Drive Connector
OutSystems MVPs
Google Drive Connector allows your OutSystems Applications to use the Google Drive REST API to interact with your files.
1120
FileSystem
João Portela
Perform operations related to the file system, such as path string manipulation, creation and deletion of directories, reading and writing text/binary files, etc..
8320