I am using html5 webpage i displayed some product list, this list are inside the div tag this is designed using css. i want to print the product list get the css style.
i need to click a button that button to capture and display the window particular div class or id. then to print the div class or id
These links will give you a good idea of what you are looking for
How to take screenshot of a div with JavaScript?
https://www.idontplaydarts.com/2012/04/taking-screenshots-using-xss-and-the-html5-canvas/
They all do it by using HTML Canvas, if you are new to it then here is a tutorial to help you out
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Canvas_tutorial?redirectlocale=en-US&redirectslug=Canvas_tutorial
There are other ways too. You can also do it by using a Javascript API
http://grabz.it/api/javascript/
or
http://html2canvas.hertzen.com/
Hope it helped !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With