Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing with proper format from console

Status
Not open for further replies.

theguru97321

IS-IT--Management
Feb 3, 2003
216
US
I want to print an HTML file to my networked printer, but it doesn't format it. it just prints as plain text.. how do i get around this?
 
I need to print from the console, because i'm printing via a scripted cron job.
 
Then you need a console app that knows how to download a page and all its links, then render the page then send it to a printer. I don't think you're going to find one. If you don't need graphics, then you could use lynx or links, but if you do need graphics, then I think you're SOL.
 
Bump.

Anyone know anymore about this? I'm really in a jam.
 
I've been using

lp filename.html

I've only got 1 printer installed, it's a HP ColorLaserJet 4500n
 
In a bout of lateral thinking, I googled 'HTML Postscript converters' and found html2ps, a perl script that converts HTML to PostScript. If you have ghostscript you should be able to print it correctly. You'd probably need to wrap it up in a script for your cron job, but you might be able to get it working.

The URL is at Uppsala - the author Jan Kärrman has written comprehensive documentation too, including tips on how to get the HTML from the web in the first place.

HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top