[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: automate printing of html-formatted pages?

Alvin Oga wrote:

On Fri, 2 Sep 2005, Matt Price wrote:


wget -m -k http://some.website.com/

and then:

#! /bin/bash
find /path/to/top/level -type f -iname *.html | while read file; do
html2ps -gn $file > "$file".ps ;
find /path/to/top/level -type f -iname *.html | while read psfile; do
lpr $psfile

unfortunately, this doesn't work very well -- among other things,

images makes simple "cat $html" not work either, otherwise,
	cat $html | lpr -Ppostscriptprinter -

wouldn't this just print the text that is contained in an html file (as opposed to a rendered/formatted html page?

how about:

while ( have-html-pages ) {
  konqueror option-to-display-to-stdout http://any-web-page  \
	| lpr -Ppostscript -

ie .. let mozilla/konqueror/galeon do your rendering locally
   but to dump to STDOUT instead

I like the idea of having a real browser do the hard work of managing the display -- but I'm not really quite sure how an "option-to-display-to-stdout" would work. I don't see any such option in the man pages for konqueror or firefox, and in any case I'm not confident that this would result in a postscript file suitable for piping to the printer... Am I missing the boat here?



 .''`.       Matt Price
: :'  :      Debian User
`. `'` 	     & hemi-geek

Reply to: