0

Does anyone know of a way I can export a Jquery Datatable into PNG/JPG format?

Currently a dashboard displays a datatable with some html formatting. Ideally I want this outputted into a PNG so users can get the image to put into their powerpoint presentations

Ideally I would like this to work on IE 8

Thanks

ninjaplayer
  • 65
  • 4
  • 13

1 Answers1

1

I can suggest to use html2canvas

This 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.

Examples

Download

Another possible solution:

var canvas = document.getElementById("mycanvas");
var img    = canvas.toDataURL("image/png");

with the value in IMG you can write it out as a new Image like so:

document.write('<img src="'+img+'"/>');
ummahusla
  • 2,043
  • 3
  • 28
  • 42