[arch-general] Sending files to printer question
This is not Arch specific, but I'll ask anyway in the hope someone will help. I have generated a html file which would show in a web-browser and hence will print from the web browsers print button. However I want to send that file directly to a printer from the command line, but have the output as if I'd sent it from the webbrowser, not just print the output of the text which is the HTML. I wondered if there was a command line utility to do the conversion. Thanks in anticipation Richard
On Tue, Aug 12, 2008 at 08:58:43AM +1000, richard terry wrote:
I wondered if there was a command line utility to do the conversion.
You could combine some nice tools Look at the tools: html2text and htmldoc First is an "simple" text parser without formatting. htmldoc is a complex tool which renders html files to ps, pdf (or html). With htmldoc you could render complex webpages with many options. The solution for your problem could a piping party.. wget downloads the html code and pipded it to htmldoc. htmldoc produces ps or pdf which you pipe to your printer. One quick example could be (one line): ,---- | wget -O - pages.html http://aur.archlinux.org/index.php | htmldoc --webpage -t ps - | lp `---- The many single - in the commands are important, this is stdin and stdout For more options and useful settings look at man htmldoc.
Richard
Gerhard -- Never use a running system...
On Tue, Aug 12, 2008 at 01:40:30AM +0200, Gerhard Brauer wrote: One mistake:
,---- | wget -O - http://aur.archlinux.org/index.php | htmldoc --webpage -t ps - | lp `----
Gerhard -- Ich: Wenn du wuesstest, was ich denke... Sie : Was waere dann? Ich: Viel Erde ueber dir...
On Tue, Aug 12, 2008 at 00:58, richard terry <rterry@gnumed.net> wrote:
I wondered if there was a command line utility to do the conversion.
For a "perfect" result with not much deps and a small codebase, use Qt's webkit! http://code.google.com/p/wkhtmltopdf/ -- Geoffroy Carrier
participants (3)
-
Geoffroy Carrier
-
Gerhard Brauer
-
richard terry