Capture screenshots for a Ruby on Rails application [closed]

落花浮王杯 提交于 2019-12-21 04:24:10

问题


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


回答1:


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?




回答2:


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




回答3:


I have used GrabzIt for this. This is quite simple.



来源:https://stackoverflow.com/questions/5647632/capture-screenshots-for-a-ruby-on-rails-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!