I asked this on the 27/7/2002

I want to convert html pages to jpg/gif images.
The plane is more like:

1. print a Web page to file
2. convert ps to jpg or gif

How can I print from console ( with color ) to file a web page ?
Does any body have a better way then i wrote above ?

---------------

Zvi Harel Wrote:

Html2ps (http://www.tdb.uu.se/~jan/html2ps-1.0b3) will convert html2ps,
together with graphics, and gs (ghostscript) will convert ps to ppm (using
-sDEVICE=ppmraw; see man ppm(5) about the "portable pixmap file format"),
ppmtogif or ppmtojpeg will convert ppm to gif or jpeg, resp. (in RedHat 7.3,
the latter programs are in the netpbm-progs-9.24-3 package). Using this
approach you can control much better the quality of your images, and you can
automate it by writing shell scripts to do it.


---------------

Yotam Rubin Wrote:

You could do the following:
Start a new X-server, possibly xvfb. Call mozilla, sleep 30, use imagemagick's
import program to obtain a screenshot of the website, use imagemagick's
convert program to do some processing on the newly acquired snapshot.
It's crude, but it should work.


---------------

Matan Ziv-Av Wrote:

If you want a text representation of the page, the lynx -dump should do
what you want. If you want graphics representation, then as far as I
know there are no such tools, but links-2 has graphics mode with a
modular output drivers architecture, so I guess that adding a graphics
-dump mode should be easy.

---------------

Dan Kenigsberg Wrote:

For some reason I fail to use netscape -remote, but if it wasn't deprecated you
could:


netscape&
netscape -remote "openURL(http://your.url)"
netscape -remote "SaveAs(site.ps, PostScript)"
gs -sDEVICE=jpeg -dBATCH -sOutputFile=site.jpg site.ps

I know people are doing similar things on top of a framebuffer X server, so
everything can be done safely from a script.

Disclaimer: never tried it myself.

And the next one:

It is extremely impolite to quote myself, and furthermore say almost the same,
but for the sake of the archive, I have to state that the following works just
fine (though long ps file should be broken, I suppose):


$ Xvfb :1&
$ DISPLAY=:1 netscape& $ DISPLAY=:1 netscape -remote "openURL(iglu.org.il)"
$ DISPLAY=:1 netscape -remote "saveAs(iglu.ps,PostScript)"
$ gs -sDEVICE=jpeg -sOutputFile=iglu.jpg iglu.ps


Anyone have an idea why this nice -remote option was not ported completely into
mozilla? Yet another "priciple"?



---------------

Ok thats about it, Please note what worked best for you :)

Cheers

Doron Shikmoni wrote:

Hi all,

There was a thread here about two years ago regarding conversion
of HTML to PDF with Hebrew charset. Apparently, htmldoc still isn't
capable of doing that (although it's on its "version roadmap"); Is there
an open-source solution for this, today?


Thanks, Doron


================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]


-- -------------------------- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 Cel: 972-52-8555757 Fax: 972-4-6990098 http://www.canaan.net.il --------------------------


================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]



Reply via email to