Printing document from Unix


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Printing document from Unix
# 1  
Old 08-12-2008
Printing document from Unix

Hi Friends,
Can anybody pls tell me how to print a letter on letter-head thro' unix? There is certain format of that document in which it has some sentences which are in ‘Bold'.

Current process that I m following is:-
Run the script to generate the letter details
Copy it from unix to MS Word
Make certain sentences bold
Print the final document


Want to automate this entire process (Want to print directly thro' Unix)

How do I do it. Please help me, it will save my hell lot of time and manual work.
# 2  
Old 08-12-2008
There are at least two distinct problems here.

To produce rich-text output, use a rich-text formatter such as troff or TeX or ReST or Markdown. There are also various XML-based toolchains but all except troff tend to basically boil down to converting the output to TeX or LaTeX, then printing that.

Actually printing a hardcopy of the resulting output (usually a PostScript file or PDF) is a separate problem altogether, and hinges a lot on your hardware, operating system, and local conventions.
# 3  
Old 08-12-2008
Ohk Era, didnt kno that this task is that complications. So how can i do now.. what ll the things i would need?
# 4  
Old 08-12-2008
Find a rich-text format which is suitable for your needs. I would suggest you look at something simple like ReST or Markdown or (if you're into classics) troff, but this depends a lot on your other needs. ReST and Markdown are intended as "light" alternatives to HTML for blogging, but extend nicely to more-complex documents, to a point. However, the machinery for producing nice-looking paper output is still evolving, and might turn out to have some unattractive problems. (I bumped into UTF-8 and table-formatting issues when I tried to use ReST to produce PDF files via their LaTeX formatting back-end. Getting TeX up and running is IMHO still not for the weak of heart; but if you have it installed and running already, that might not be an issue.)

If all you need is pretty-printed output with a few snippets in boldface, the necessary troff codes are easy enough to add with a simple script, and you probably have all the necessary software installed on your system already. If you need more complex features, however, the learning curve is rather steep, and not a lot of people are able to help you. This is what Bell Labs used to produce patent applications and books back in the 1970s, so it's proven, but the skill set is not exactly in the vogue any longer, and it never was very newbie-friendly.
# 5  
Old 08-12-2008
Ohh i think I should drop the idea of automating this process :-(
# 6  
Old 08-12-2008
Before you give up, try the following.

Code:
groff -Tutf8 <<HERE | head -1
This is regular,
.ft B
bold,
.ft
and regular again.

Producing PostScript from the same input is a simple matter, and if your printer etc are correctly configured, printing should be a snap.

See also GNU Troff (Groff) Manuals Online

An alternative mark-up would of course be HTML, and you could simply print from your browser. html2ps is also good for producing PostScript output from HTML in a completely automatic fashion (although it, too, has its limitations, e.g. with UTF8; but given its origins, it's rather impressive).
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Printing a document in UNIX

Hi, I would like to know the command to print a document with portait option. Note : I used the below command, however I am not getting any output and it is blocking the printer queue. lp -d Dubprint -o portrait Adhoc_stmt Also, how can I see the default printer settings and how to... (1 Reply)
Discussion started by: mr_manii
1 Replies

2. UNIX for Dummies Questions & Answers

Sco Unix printing : jobs hangs in queue - printing via lp versus hpnpf

Hi, We have a Unix 3.2v5.0.5. I installed a printer via scoadmin, HP network printer manager with network peripheral name (hostname and ipadres are in /etc/hosts). This is the configuration file : Code: root@sco1 # cat configurationBanner: on:AlwaysContent types: simpleDevice:... (0 Replies)
Discussion started by: haezeban
0 Replies

3. Shell Programming and Scripting

copy contents of unix file to Word document

Hello, I have a unix file about 3000lines which i want to copy from and paste it into a Word document. If i cat the file and try to scroll through it then not everything is captured so i am getting and incomplete paste. Any help is really appreciated. jak (2 Replies)
Discussion started by: jakSun8
2 Replies

4. Shell Programming and Scripting

Modifying XML document with Unix Script

Hi, I have xml documents that I want to change a value in, I can do it using sed in a text document but not the xml document. I have read other posts that allow the change between tags but the part I wish to change is only a small part of data with the tags. e.g. <?xml version="1.0"... (2 Replies)
Discussion started by: heather.morton@
2 Replies

5. Shell Programming and Scripting

Unix Operating Systems Information Document

Hi all, I prepared a document on UNIX OS. Its an humble attempt to share my knowledge. Please review the document attached and correct if any mistakes and any suggestions to make it more useful and any troubleshooting information if needed to add. Please help in making the document to add... (2 Replies)
Discussion started by: gurukottur
2 Replies

6. What is on Your Mind?

freeware to document your IT infrastructure for unix

I just started using this good free software that lets you document your entire IT infrastructure. It's called Auditor Lite or Documentor for Unix and in my opinion it's the best software out there and the fact that it is free is even better. Just thought I would let you guys know if you want to... (1 Reply)
Discussion started by: itguy321
1 Replies

7. UNIX for Advanced & Expert Users

UNIX System Admin Document

Hi all I am trying to document my entire system (hardware/software/admin) Is there a template I could use for the purpose. This document will be the used by all System admins/ Management the company when they want to find out anyting about any of the servers we manage. If there is no such... (6 Replies)
Discussion started by: skotapal
6 Replies

8. UNIX for Advanced & Expert Users

Printing Problems in unix ... ( Bar-cdoe - Ip Printing)

Hi guys ... i need ur help with some printing problem in unix ... first prob. : i wanna print from my NCR unix to an Win NT , Ip based printing server ( HP JetDirect ) . My issue , is it possible to print directly to an Ip address from unix ? How do i make it work to get any results ?... (3 Replies)
Discussion started by: QuickSilver
3 Replies
Login or Register to Ask a Question