Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9028441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:59:05+00:00 2026-06-16T06:59:05+00:00

I am attempting to let users on my site push a button to take

  • 0

I am attempting to let users on my site push a button to take a screenshot of the current screen ( everything in body).

From my research, html2canvas seems to be a resource that makes this possible.

My issue is the documentation does not provide example code and I am struggling to get a grip on the steps involved.

http://html2canvas.hertzen.com/documentation.html

The following SO question ( How to upload a screenshot using html2canvas? ) leaves me a bit confused. I just want to know how to get an image at this point.

From his code.

$(window).ready(function(){
    ('body').html2canvas();
    var canvasRecord = new html2canvas(document.body).canvas;

     //At this point does the .toDataURL method return a png?
});

At this point I am lost where the image is, or even how/when to create it. Ill worry sending it to the server later.

Any information appreciated. Thanks! (html2canvas even needed?)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T06:59:06+00:00Added an answer on June 16, 2026 at 6:59 am

    As you are using the html2canvas jQuery plugin, here is a sample snippet

    var screenshot;
    
    $('body').html2canvas({
      onrendered: function(canvas) {
        screenshot = canvas.toDataURL();
    
        //code to process/send the image to server
      }
    });
    

    In the above code snippet the html2canvas creates the screenshot of the page.

    You can also use PhantomJS to create screenshots of webpages – provided that they are public pages, because you may not be able to access login protected pages on the server-side; in such situations only a client-side solution like html2canvas will work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Attempting to change the files folder location in a Drupal site from /files to
I am attempting to let the user select an image from the gallery on
Attempting to use the data series from this example no longer passes the JSONLint
I am attempting to allow users to supply me with their facebook link when
I'm attempting to create a map that allows users to report a trailwork problem
As in many web applications, when my users log into my site, I set
First let me say what I am attempting to accomplish. I would like to
I'm attempting to create a dynamic map using the latest Google Map API. Everything
So first let me describe what I am attempting to do. I have an
Initially let me give an overview of my application. I am attempting to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.