a2ps with htm script tags

11.3 a2ps seem to spawn a huge number of processes, an do nothing
when it attempts to print a file with html script tags like
<SCRIPT LANGUAGE=“JavaScript” Type=“Text/Javascript” src=“lcmjs.js”>
</SCRIPT>
Take these out and it works. Put these two lines in it fails.
???
Any ideas??
Thanks

This appears to be a bug, please report it on bugzilla.novell.com.

The reason is that a2ps guesses that it’s a HTML file and delegates input processing to w3m. If you look at the processes it starts, it calls w3m --dump to read the file and then send the input to a2ps as text. For some reason w3m chokes on the file containing the <script> tags.

You can bypass the delegation by:

a2ps --delegate=off foo.txt

However in that case it doesn’t do anything with the HTML but treats the file as text. Maybe that’s what you want anyway.

In 11.2, a2ps guessed that the file is text, not HTML. Perhaps if it were made to treat the file as HTML, it might trigger the same bug in w3m.

Ken_yap
Thank you very much.
Actual the Script tag is on a line of code in an PHP file. THe php pgm is generating HTML, and I was listing the program.
Will report.
Thanks again.