Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capture screenshots for a Ruby on Rails application [closed]

I have a Rails app that I want to capture a screenshot of a webpage when the user enters a url.

  1. Is it possible to do this in Rails (is there any gem that would do this?)

  2. If not, are there any reliable services that generate live screenshots

like image 678
Lee Avatar asked Apr 13 '11 10:04

Lee


People also ask

How do you screenshot on an application?

On many Android devices, you can capture a screenshot with a key-combination: Simultaneously press-and-hold Power and Volume-down. You can also capture a screenshot with Android Studio as follows: Run your app on a connected device or emulator. If using a connected device, be sure you have enabled USB debugging.

Can a website disable screenshot?

All these commands are controlled by our operating system, and we can't disable or block them in the browser using HTML/CSS/JavaScript. So, we can't prevent users from taking screenshots.

How do I take a screenshot of a protected Web page?

Ø Open the Restricted app where the screenshot will be taken. Ø Select the Settings icon that looks like a toolbox from the floating button on your screen. Ø Select the Screenshot option from the drop-down menu and shut the drop-down menu. Ø A second floating button, a left-hand camera icon, will appear on your screen.

How do I take a screenshot in code blocks?

You can use ALT + ENTER from output window of C ++ then you will come out of full screen.


2 Answers

I use IMGKit gem for that: https://github.com/csquared/IMGKit

Related topic: How to respond_to PNG or JPG in Rails and generate image from HTML?

like image 133
fl00r Avatar answered Oct 02 '22 23:10

fl00r


ScreenCap gem which uses PhantomJS under the hood. Grab whole pages or just specific divs, or even exact x y coordinates.

like image 45
iamse7en Avatar answered Oct 02 '22 22:10

iamse7en