Date: Mon, 29 Jan 2001 21:23:28 -0600 (CST) From: Mike Meyer <mwm@mired.org> To: Chip <chip@wiegand.org> Cc: questions@freebsd.org Subject: Re: printing html/javascript web page mark-up Message-ID: <14966.13232.121166.524545@guru.mired.org> In-Reply-To: <59025992@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
Chip <chip@wiegand.org> types: > You assume correctly. > When using an editor, as mentioned below, I just want to print > the source I am writing. Cool, that makes it easy. > > > There must be a way to print all the mark-up used > > > for a web page. > > lpr works fine, so long as you're not using a print filter that > > recognizes the HTML and converts it automatically. In that case, > you need to defeat or reconfigure the filter. > > If the filter is the problem, defeating it is something > I am not familiar with. I used apsfilter to set up my > printer, it set up two filters during the install process. > I tried both, the first won't print all the text in the > above mentioned files, the second (raw1) does stair-stepping, > so that may need to be fixed, but it started to print the > actual mark-up that I wrote. > This may be what I need to fix to print this stuff. Gotcha. By default apsfilter will try to render the html using html2ps. That, of course, will not get your javascript (though it will show you what the page would look like on a browser that isn't interpreting javascript for some reason). apsfilter uses a2ps to print text (which is part of why I quite using it). You should be able to use a2ps (check the man page) to turn your html file into postscript that is the text of the file, not the rendered version that html2ps gets you. Printing that postscript should do the trick. You can use ghostview to check the resultes before printing. You might also want to look at the enscript prot, which also converts ASCII to PS (which is what a2ps does), but will "pretty-print" based on language type if you ask it to, and recognizes both HTML and Javascript (though I have no idea how it works if you mix the two). I just use "enscript -E index.html", and my HTML file gets printed with a header line (disableable), and all the tags in bold face. Enscript also supports output to HTML, overstrike for line printers or less, and Rich Text Format. Final comment: Printer filters on Unix don't get to see file extensions; they look inside the file to figure out what kind of thing you're printing, and try to render it if they can. That's why you kept having trouble - apsfilter was seeing HTML, and rendering it! Most of the time, it's really convenient, but every once in a while, you want to print the source, not the rendered version. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14966.13232.121166.524545>