Computing.Net > Forums > Unix > NEED TO PRINT HTML IN UNIX! HELP!

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

NEED TO PRINT HTML IN UNIX! HELP!

Reply to Message Icon

Name: Evan
Date: January 31, 2002 at 09:46:02 Pacific
Comment:

Im trying to print html docs from unix but im just getting the raw text with all the tags and such, i need it look like it does in netscape. Ill even try converting html to jpg or something to accomplish this. Im running Solaris 7. thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: Beaker
Date: January 31, 2002 at 10:06:28 Pacific
Reply:

Well, you CAN get Netscape & even Internet Explorer for most Unix OSes, however a simpler approach is to just use the html2rtf tool which is probably lurking somewhere on you system allready. Note: you may have to prefilter the document with dos2unix - another command line utility that strips off the end-of-line coding unique to text documents created in DOS/Windows text. Basic command line entry would probably be

yourfile.txt | dos2unix | html2rtf > lpr

Beaker


0

Response Number 2
Name: Evan
Date: January 31, 2002 at 12:17:52 Pacific
Reply:

I forgot to say i need to print from the command line ONLY. The above reply didnt work at all, unix lpr or lp does not understand rtf files either and your example talks about a text file, im using an html file.
thanks


0

Response Number 3
Name: Beaker
Date: February 1, 2002 at 10:17:04 Pacific
Reply:

In UNIX nearly all files are text files.

there is yet another utility called "rtf2txt" - see a pattern here ? - that will do the rtf to text conversion. Just slip it into the command line pipe previously posted.

"lp/lpr" are the common designator for a UNIX printer. Yours could be different. Also, if you're looking to retain the formating - ie pretty fonts of differnt sizes - you'll likely need to utilize "ghostscript" or a similar postscript-emulator for your print job.


0

Response Number 4
Name: Evan
Date: February 4, 2002 at 11:43:01 Pacific
Reply:

Dude i dont think you understand my prob. I have an html file, a web page, i am trying to print it with all the pretty formatting, frames fonts and such. Why would i use a rtf2text or html2rtf?!?!? then i lose all my pretty formatting. I am using lp or lpr it doesnt matter to me. I am a unix expert but this is not an easy task. If i open it in the netscape gui and print it its fine but i need to script this into my scripts. if netscape can do it i know it can be done, someone told me to try getting an html printer filter for lp but i cant find one.
How would converting it to rtf be any help at all?!?!?!


0

Response Number 5
Name: Wolfe
Date: April 19, 2002 at 13:16:30 Pacific
Reply:

You need html2ps.
I'm trying to get it to work on my system right now. I can print out the HTML file to a postscript printer, but the images do not show up. You'll need ImageMagick or some similar program for that.
I'm having trouble getting html2ps to recognize that ImageMagick is installed for the graphic problem.
Good Luck!


0

Related Posts

See More



Response Number 6
Name: toan pham
Date: May 26, 2002 at 09:51:17 Pacific
Reply:

hi ya'll

I have the same problem too.
I have more than 500 pages to be printed in html format, will frame, text align and everything. I need to know if there a script which will send pip netscape printing proccess to the printer. Will someone help me,,,,?

www.aznblood.net


0

Response Number 7
Name: Sean Miller
Date: June 13, 2002 at 02:39:58 Pacific
Reply:

The page for html2ps is http://www.tdb.uu.se/~jan/html2ps.html

Once you have it in postscript you *should* be able to create a postscript file using

html2ps file.html > newfile

Then you can print the new file.

Not sure how successful it will be, though -- if you consider how differently browsers interpret HTML... ;-o

Sean


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: NEED TO PRINT HTML IN UNIX! HELP!

Writting To Parallel Port in UNIX www.computing.net/answers/unix/writting-to-parallel-port-in-unix/6284.html

Install print server in unix www.computing.net/answers/unix/install-print-server-in-unix/5265.html

How to change IPs in SCO Unix 5.0. www.computing.net/answers/unix/how-to-change-ips-in-sco-unix-50/4685.html