Re: Convert Page to Image

2011-08-06 Thread based2
http://www.delicious.com/based2/screenshot

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Convert-Page-to-Image-tp4655293p4672010.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Convert Page to Image

2011-08-01 Thread ashu.soman
Hi,

How can one take a snapshot of a page or convert page into an image?

The situation is actually like, i want to take a snapshot of a pop-up page
and save it as an image. And then use it as a thumbnail..
Or Is there any other way to use a page as a thumbnail? I don't want to
embed the page as there will be a lot of pages..

Thanks,
Ashutosh

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Convert-Page-to-Image-tp4655293p4655293.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Convert Page to Image

2011-08-01 Thread Taha Hafeez
http://tawus.wordpress.com/2011/05/02/tapestry-magic-10/


On Mon, Aug 1, 2011 at 8:42 PM, ashu.soman soman.ashut...@atos.net wrote:
 Hi,

 How can one take a snapshot of a page or convert page into an image?

 The situation is actually like, i want to take a snapshot of a pop-up page
 and save it as an image. And then use it as a thumbnail..
 Or Is there any other way to use a page as a thumbnail? I don't want to
 embed the page as there will be a lot of pages..

 Thanks,
 Ashutosh

 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Convert-Page-to-Image-tp4655293p4655293.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org



regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Convert Page to Image

2011-08-01 Thread Vangel V. Ajanovski

On 08/01/2011 05:12 PM, ashu.soman wrote:

How can one take a snapshot of a page or convert page into an image?

The way that Taha mentioned works by using a library that will download 
the HTML and will try to render it to PDF. There are various such 
libraries. Such renderers can't do magic, so the success depends on the 
complexity of the popup web page (frames, divs, objects, flash?).


If that is good enough and the web page is simple, than you are OK.

But if it's a complex page, or you are building some cataloging site or 
CMS which needs to store many bookmarks and grab snapshots for each 
bookmark, and you are not in control of the remote web sites and their 
complexity, than the only solution is to run a full browser in the 
background, like a service, and make it do the snapshots to files.


On linux it is possible for example to run Firefox headless ( in the 
background in a virtual XWindows - with the GUI  sent to a virtual 
screen frame buffer) and you can have it open any web page, render it in 
the virtual buffer and then you can read the contents of the virtual 
screen and convert it to an image file. And it will look exactly as if 
you were on the desktop on that computer, surfing with Firefox.


The problem with this is that you need to have enough privileges on the 
server to be able to setup the environment, and it will need lot of RAM 
for each process (as much RAM as the browser itself needs to open and 
more depending on the page complexity), and you will have to make custom 
shell scripts on the server that will invoke the browser in the 
background with the right options to save the output to a file.


Search on google: firefox headless

There are many guides how to do this, and here is just one random link 
from the search:

http://www.unruhdesigns.com/blog/2010/10/using-firefox-on-a-headless-server-to-make-screenshots-aof-websites

Just a note, in case someone needs to do staff like this, in a similar 
way you can even run Libreoffice on a headless X server, and for example 
use it as a service to render DOC to PDF, or convert documents from one 
type to another, execute macro-s on documents, etc...




smime.p7s
Description: S/MIME Cryptographic Signature