3

I may fall under the list of possible duplicates but still i could not find the answer according to my req.In my rails application i have some web pages with a link of print option. Now what i need is when i click on this print ,i should get a screen shot of the current web page and a popup box to save the image .Is there any plugin available for the same.

Also any queries for code are welcome

Thanx

Bijendra
  • 9,467
  • 8
  • 39
  • 66

2 Answers2

1

You could go for phantomJs. Where you can alter the page HTML, manipulate CSS, insert & call javascript snippets, the way you need it.

Good documentation available and also you can find great deal of help in stackoverflow-phantomjs

Regards,
HBK

Community
  • 1
  • 1
Hbksagar
  • 548
  • 7
  • 17
0

May i suggest that you use http://www.w3.org/TR/css-print/

if you want to make a screeenshot you have to work with the user env, so i suggest you look at this topic How do I take screenshots of web pages using ruby and a unix server?

Community
  • 1
  • 1
Todor Grudev
  • 1,513
  • 2
  • 14
  • 25