Problem with printing html-files
pipitas
k1pfeifle at gmx.net
Mon Jan 22 19:38:47 PST 2007
Vera wrote:
> Hi! I have AIX5.3 & CUPS (version 1.1.23). My CUPS works properly, I can
> print txt-files, pdf-files from command line.But when I try to print html
> or htm files using CUPS, I get the html-code ;( Why does it happen? I
> found html2ps ,which converts html-files to Postscrint, installed it and
> only after that I got the properly printed html-file. But it's not the
> solution - html2ps don't understand the tables. Please help! Thanks!
You can't print HTML files from the commandline and expect to
see something else than the HTML source code on the printout :-)
At least not with the current CUPS default setup. You'll see
(of course) in the /etc/cups/mime.convs file support for HTML
printing:
kurt at soprano:~> grep html /etc/cups/mime.convs
text/html application/postscript 33 texttops
but this is because the "texttops" filter does treat it as a
text file (would be a bit too much to expect texttops to know
how to render a HTML file, wouldn't it)?
However, there is "htmldoc" which *can* convert htmlfiles to
PostScript and/or to PDF. It should be relatively easy to hack
a wrapper script that runs a htmldoc binary via a commandline
that is able to convert many common html files into nicely
formatted printouts (even with table support), and to dock that
wrapper into the set of CUPS filters....
See here:
http://www.easysw.com/htmldoc/
Or, in short: use a browser if you want to print HTML files... :-)
(and don't you tell me that AIX 5.3 doesn't ship with a browser :-)
More information about the cups
mailing list