Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save screenshot server-side #283

Closed
nigina opened this issue Oct 22, 2013 · 6 comments
Closed

Save screenshot server-side #283

nigina opened this issue Oct 22, 2013 · 6 comments

Comments

@nigina
Copy link

nigina commented Oct 22, 2013

Hi, how can i save the screenshot server-side with java? Or is html2canvas only client-side? I am using html2canvas to capture screen shot of website and i need save screenshot server-side. The user must not see screesnhot of website.

Is it possible with this tool?

P.S. Sorry for my English.

@niklasvh
Copy link
Owner

No, it isn't possible to capture server-side. html2canvas is meant to be running alongside a real DOM.

You can capture client-side and then upload it to the server though.

@andresdevsar
Copy link

For server side browsing you can try http://casperjs.org/ or
http://phantomjs.org/

2013/10/22 Niklas von Hertzen notifications@github.com

No, it isn't possible to capture server-side. html2canvas is meant to be
running alongside a real DOM.

You can capture client-side and then upload it to the server though.


Reply to this email directly or view it on GitHubhttps://github.com//issues/283#issuecomment-26809243
.

@nigina
Copy link
Author

nigina commented Oct 23, 2013

Thanks for the Tip.

@nigina nigina closed this as completed Nov 12, 2013
@SemanticBeeng
Copy link

@niklasvh please be kind to explain why one could not get a "real DOM" from PhantomJS on the server side and use html2canvas just like from the client side

Would something like this not work on the server side with html2canvas?

http://stackoverflow.com/questions/12180508/dom-manipulation-with-phantomjs
https://gist.github.com/n1k0/1501173#file-gistfile1-js-L29-L33

Thanks
Nick

@nithinkolekar
Copy link

nithinkolekar commented Jan 9, 2018

@niklasvh
I think @SemanticBeeng is talking about perform capture with ghost user which may frequently(cron) capture page and save it on directory which is accessible to webserver.

I implemented with PhantomJs same functionality but html2canvas is more convenient IMO.

update : Use case
I needed to capture some div as image to post it as Twitter card.

@alisalmabadi
Copy link

alisalmabadi commented Aug 29, 2018

@andresdevsar and @SemanticBeeng can I use phantomjs or casperjs to get screenshots of the current user page which have been edited? you know! I want to let users take the screenshots of the page they have modified but unfortunately, html2canvas doesn't support the CSS properties and I have to use in that page
and I didn't see these abilities in phantomjs or casperjs ...
guide me please!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants