Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

Hi help please php,javascript and html Is there any way of taking screen shot of any part of the interface but not the whole window and save it as an image in a file.

Computer Science
See more answers at brainly.com
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Join Brainly to access

this expert answer

SIGN UP FOR FREE
If you are talking about taking the screenshot of a part of a webpage , then yes it is possible.....but if you are talking abt taking the screenshot of user's desktop/wholescreen ,using php and html then No. Screenshot of a webpage could be taken in multiple ways , but the most suitable way in my opinion would be to use , \(\href{http:///html2canvas.hertzen.com/documentation.html}{html2canvas}\) library . Example: Suppose we want to take screenshot of div with id "test" Html Code:-
Take My screenshot

Some other part of html

Javascript Code: var element = document.getElementById('test'); html2canvas(element, { onrendered: function(canvas) { //rendered canvas var download = document.createElement('a')//creating link for downloading image download.href =canvas.toDataURL();//use canvas.toDataURL('image/jpeg') for jpg file download.download = true; document.appendChild(download); } });
so its that all can i test it now to see the output? or i still have to do extra things
That is all, You just have to include html2canvas.js in ur external javascript libraries

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

maybe thats why
error on property"canvas let me redo it"
here is the working/complete version of the example.....http://pastebin.com/wKqtSmmL
screenshot
Take My screenshot

Some other part of html

this is the error i am getting check the attachment
1 Attachment
have you tried using this code ?....... http://pastebin.com/wKqtSmmL <----
That error is shown because html2canvas.js isnt downloaded on your system.... you can use cdn version tho....and code given in http://pastebin.com/wKqtSmmL should work fine.What are you getting using that code?
it actually outputs the exact code i 'va copied ,is the a way to embed the button which i will click it to take screen shot.but it is working tho.
So image is being downloaded when u click on button?or is it giving error?
i can say it the image but it output the code as an image so i don't know how am i going to put it on my code
THIS IS ACTUALLY THE OUTPUT I GET
Take My screenshot

Some other part of html

can you upload the image which is being downloaded?
let me look for it ..
no image being doawnloaded the output is just the code .
Hey. i have always wanted to use screen shots in my websites. i just tested and followed the code above, it out puts the code exactly as is.
ok i've put it on my local host this is what i get now
1 Attachment
Yes thats the screenshot of your div...... it is working , If you want to open the image instead of downloading it , just change "download.download = true;" to "download.download =false;" in your code.
its working now, thank you alot :)
ok it is fine thanks :)
no worries
Have you tried Snipping Tool?

Not the answer you are looking for?

Search for more explanations.

Ask your own question