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 7872551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:13:58+00:00 2026-06-03T02:13:58+00:00

I tried using html2canvas to generate a screen captures for a portion of the

  • 0

I tried using html2canvas to generate a screen captures for a portion of the screen but It generates am image of the entire document.

Am I doing something wrong here ? (“graph” is a div id)

$("#graph").html2canvas();

Also,how do I save the resulting image to another location other than the specified element ?

  • 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-03T02:14:01+00:00Added an answer on June 3, 2026 at 2:14 am

    Can you clarify what you mean by saving the image to another location? If I’m understanding what you’re asking, assuming you are using the "jquery.plugin.html2canvas.js", you need to edit the "$canvas.css" line in that file, to specify where you want to append your canvas object.

    One option you may consider is to keep it appending to the body, but set the css to "display: none" so that the object doesn’t keep showing up. Then, after the css properties you can put in your own function to manipulate the canvas object.

    $canvas.css({width: '500px', height: '500px', display:'none'}).appendTo(document.body);
    $canvas.attr('id', 'canvasObj');
    manipulateCanvasFunction(document.getElementById('canvasObj'));
    

    This sends the complete canvas object to your "manipulateCanvasFunction," and you can do whatever you want with the canvas object.

    You might check out this question thread for some other ideas.

    Edit: Removing incorrect information

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

Sidebar

Related Questions

I tried using mechanize to see the URL of the image, but its a
I tried using webBrowser1.Document.Body.ScrollTop and webBrowser1.Document.Body.ScrollLeft , but they don't work. They always return
I tried using both ReadProcessMemory() and WriteProcessMemory() in my application,but in both cases I
I tried using height: 100% but this makes the div only as high as
I tried using Path.GetDirectoryName() but it doesn't work. What I'm trying to get is
I tried using <link href=@Url.Content(~/Content/Extras.css) rel=stylesheet type=text/css /> but got a warning Validation (XHTML
I tried using webparts on an asp.net webpage and got a blank screen. While
I tried using a free script that I found on the Internet but it
I tried using <?php echo php_uname(m); ?> , it returns i586 but I am
I tried using this but didn't work- return value.replaceAll(/[^A-Za-z0-9 ]/, );

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.