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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to create shellscript to print with bold text 1

Status
Not open for further replies.

hambam

Technical User
Feb 7, 2003
13
0
0
DE
Hello,

fine to be here ;-) and here's my first question:

I wonna create a script to do an database backup in shutting down the database, making a backup to tape and restart the database.
In any case of an error the script automatically creates an error report which is automatically printed to my favorite printer.
So far so good ;-)

Now i would like to give the script some optical improvements.
So the errormessages, if ever one appears ;-), should be printed in bold letters.

I'm not as much experienced as i should be, but i hope, you patientfully give me some hints.

(Please excuse my english, i hope you're able to understand my problem. If not, feel free to contact me directly at hambam@despammed.com)

Greetings
 
Okay, what I said above about tput is for the screen, after reading again what you wrote, you want to print bold letters to a printer. This is going to be handled by the postscript or pcl codes that you send to the printer.

Find the printer manual and it will give you the printer codes to send to the printer to bold text. I used to do it all the time at my last job where we had a Kyocera printer and setup different drivers that were invoked which sent different printer codes.
 
Hello,

first of all, thanks for your answer.
I'm using a printer from hewlett packard.
It's already an older version, it's a HP Laserjet 5N.

Perhaps here's someone, who already realized bold letters printing on a hp printer.

Greetings
 
I read a little bit through the manual of the pcl escape sequences from the hp printers.

It seems to look like ^[[1m to activate bold.

But I tried it creating a dummy text file containing

^[[1m is this printed bold?

and printing this file to my printer via lp -dmy_printer dummy.txt

But my printer just printed out the whole text inclusive the escape sequences as text, too.

How could it be done?

 
Same problem here. When I send that to the file from my program it just prints as text in the file.

Any help??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top