Have you ever been through a situation where you need to embed a Flash object or some other element in a pdf file which cant be done directly? There is gr8 solution for it
with the help or combination of RMagick + Image Magick + win32Screenshot gem you can take the screenshot of the desktop or webpage and generate an image from it and eventually embed it in your pdf file
Here is the code for itrequire 'win32screenshot'
require 'RMagick'
def screenCapture
width, height, bitmap = Win32::Screenshot.desktop
img_lst = ImageList.new
img_lst.from_blob(bitmap)
img_lst.write('public/screen.png')
true
end
If you are stuck any where just write to me or post a comment here
I would be pleased to solve your error
Wednesday, September 17, 2008
Page Screenshot in Rails
Labels:
Capture Screen,
page shot,
Screen Capture,
screenshot
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment