Bugzilla – Bug 152470
a2ps when printing HTML: "sh: netscape not found"
Last modified: 2007-06-06 17:15:08 UTC
When trying to print HTML using a2ps-4.13-1051, the following messages appears: sh: netscape: command not found [file.html (html, delegated to Netscape): failed Ignored] [No output produced] Either there should be a dependency for Netscape (less desirable), or an alternate method for printing HTML should be used.
I reproduced it with Suse Linux 10.1 beta3 default packages installed (a2ps-4.13-1063): ---------------------------------------------------------------------------- # a2ps -1 -o /tmp/a2ps.out /usr/share/doc/packages/ghostscript/doc/News.htm sh: netscape: command not found [/usr/share/doc/packages/ghostscript/doc/News.htm (html, delegated to Netscape): failed. Ignored] [No output produced] ---------------------------------------------------------------------------- Therefore I changed the product from 9.2 to 10.1 The reason is that delegation to netscape is defined in /etc/a2ps.cfg Normally HTML is printed via a browser or directly via CUPS and then the browser or CUPS produce PostScript. Therefore only a minor bug. A hard RPM requirement for netscape is not possible because a2ps works without netscape (e.g. for plain text) and furthermore netscape is outdated. Werner, do you know if an alternate method can be used by default to convert HTML to PostScript via a2ps? I.e. using a tool which is installed by default (for example html2ps cannot be used because it is not installed by default). But w3m seems to be installed by default and it can be used to convert HTML to plain text which can then converted by a2ps: w3m -dump /usr/share/doc/packages/ghostscript/doc/News.htm | a2ps ...
Correction: CUPS cannot convert HTML to PostScript. There is no CUPS filter for HTML->PostScript in /usr/lib[64]/filter/. CUPS prints HTML files as plain text, see "text/html" in /etc/cups/mime.convs.
I'm now using: ########## HTML files # Pass HTML to w3m, hoping that there is an installed w3m... Delegation: w3m html:ps \ ${W3M:-w3m} -dump '$f' | #{del.a2ps} this does the job.
fixed