What is the easiest way to convert a webpage into a jpg or png file? I've seen several programs that can do various conversions, but nothing open source that can do it in a single conversion. Just wondering if anyone on the list has suggestions for something I can put into a script to convert a webpage into a file I can use with my screensaver. c
On 14/08/2013 13:47, Carl T. Miller wrote:> What is the easiest way to convert a webpage into a jpg > or png file? I've seen several programs that can do > various conversions, but nothing open source that can > do it in a single conversion. > > Just wondering if anyone on the list has suggestions > for something I can put into a script to convert a > webpage into a file I can use with my screensaver. > > c > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centosPerhaps use one of the PDF printing tools (where you can print to a PDF file) and then use convert from ImageMagick to convert the PDF file to a graphics format.? -- Regards, Giles Coochey, CCNP, CCNA, CCNAS NetSecSpec Ltd +44 (0) 8444 780677 +44 (0) 7983 877438 http://www.coochey.net http://www.netsecspec.co.uk giles at coochey.net
On Wed, Aug 14, 2013 at 2:47 PM, Carl T. Miller <carl at carltm.com> wrote:> What is the easiest way to convert a webpage into a jpg > or png file? I've seen several programs that can do > various conversions, but nothing open source that can > do it in a single conversion. > > Just wondering if anyone on the list has suggestions > for something I can put into a script to convert a > webpage into a file I can use with my screensaver. >I don't really think this is on topic, but regardless, have a look at phantomjs' [1] rendering capabilities [2]. Ciao -- Regards Leon [1] http://phantomjs.org/ [2] https://github.com/ariya/phantomjs/wiki/Screen-Capture
On Wednesday 14 August 2013, "Carl T. Miller" <carl at carltm.com> wrote:> What is the easiest way to convert a webpage into a jpg > or png file?JPEG isn't an appropriate format for text. I'm not sure about PNG. -- Yves Bellefeuille <yan at storm.ca>
Carl T. Miller wrote:> What is the easiest way to convert a webpage into a jpg > or png file? I've seen several programs that can do > various conversions, but nothing open source that can > do it in a single conversion. > > Just wondering if anyone on the list has suggestions > for something I can put into a script to convert a > webpage into a file I can use with my screensaver.A script? You could easily take a window capture with the Gimp. mark
>From: Carl T. Miller <carl at carltm.com>>To: CentOS <centos at centos.org> >Sent: Wednesday, August 14, 2013 5:47 AM >Subject: [CentOS] convert webpage to image> >What is the easiest way to convert a webpage into a jpg >or png file?? I've seen several programs that can do >various conversions, but nothing open source that can >do it in a single conversion.I wrote a few lines to do this, but it involves using firefox, and 'import' from ImageMagick. The first script starts firefox in a virtual frame: ==Xvfb :2 -screen 0 1280x1024x24 > /dev/null 2>&1 & export DISPLAY=localhost:2.0 firefox http://ip.of.your.page/page.html & == Then the second script captures/crops what I want: ==export DISPLAY=localhost:2.0 import -crop '1024x512+54+235' -window root /path/to/result.png = You'll have to adjust the crop values to what you want.
On Wed, Aug 14, 2013 at 8:47 AM, Carl T. Miller <carl at carltm.com> wrote:> What is the easiest way to convert a webpage into a jpg > or png file? I've seen several programs that can do > various conversions, but nothing open source that can > do it in a single conversion. > > Just wondering if anyone on the list has suggestions > for something I can put into a script to convert a > webpage into a file I can use with my screensaver. > > c >This will do exactly what you want without resorting to hackery or using external services. It has a component to convert to both pdf or an image and uses webkit. http://code.google.com/p/wkhtmltopdf/ The binaries are standalone and require no special dependencies. The command line is sensitive to the order you place options, but otherwise it works very well. ? Brian Mathis
Seemingly Similar Threads
- Centos 6.4 - yum update gives: Error: kernel conflicts with bfa-firmware
- sedwards@sedwards.com causes me to be knocked off the list
- Centos 6 - x11vnc auto probing to port 5903
- Outlook 2010 very slow when using IMAP - are there any tweaks?
- OpenLDAP migration from Centos 5 to 6