How To Take Screenshot Of Webpage Using PHP & jQuery

It's only fair to share...Share on Facebook0Share on Google+0Tweet about this on Twitter0Share on LinkedIn0Pin on Pinterest0Digg thisShare on StumbleUpon0

screenshot jquery

We have read lots of screen capture jquery libraries. But today we are going to introduce a jquery library “Html2Canvas JS”, a very simple jquery library to take screenshot of particular section of webpage or full webpage as per requirement. So first you have to download latest Html2Canvas jQuery plugin from https://github.com/niklasvh/html2canvas/releases. Now in this tutorial we are going to explain how to use H2ml2Canvas JS to take screenshot.

In first step we have to include js and html2canvas library:

index.html: Button from where we call the function on click.

JavaScript function to capture specific div/portion of webpage, you just have to provide div id as an input as mentioned below

JavaScript  function to capture full webpage:

save.php: To save screenshot on webserver:

If you want to download the screenshot then use following code

 

Tags:

Comments

  1. By Rodrigo

    Reply

  2. By sattar ameri

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">