捕获 Ruby on Rails 应用程序的屏幕截图 [英] Capture screenshots for a Ruby on Rails application

查看:48
本文介绍了捕获 Ruby on Rails 应用程序的屏幕截图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Rails 应用,我想在用户输入网址时捕获网页的屏幕截图.

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

  1. 是否可以在 Rails 中执行此操作(是否有任何 gem 可以执行此操作?)

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

如果没有,是否有任何可靠的服务可以生成实时屏幕截图

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

推荐答案

为此我使用 IMGKit gem:https://github.com/csquared/IMGKit

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

相关主题:如何在 Rails 中响应 PNG 或 JPG 并从 HTML 生成图像?

这篇关于捕获 Ruby on Rails 应用程序的屏幕截图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆