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!

printing a text file in courier 8

Status
Not open for further replies.

dylanmendes

Programmer
Sep 13, 2004
3
IN
$1001.00 to the first person to answer this!!!
I have a text file. I have a fax software that ignores my font and prints it with variable proportion fonts that I do not want. My questions are - What is the esc seq for courier 8? How do I add this to my text file and where (I tried putting it at the top fo the file and it didn't work)?

Here is the solution the Fax people gave someone else:

"When you send a text file to a printer without any font formatting info, the printer will print the page using it's default font. This is true of the RightFAX conversion engine as well. The default font for RightFAX is a proportional space font. If you wish to have your text file print out in Courier, you will need to include a PCL-5 escape code at the beginning of the text file which instructs the receiving printer to use the Courier font. The PCL-5 escape code for Courier 10 point font is: {ESC}E{ESC}(s4099t0b0s12h0P
 
<esc>(s0p8h0s0b4099T

will nominally give you 8 characters per inch.


Jim Asman
 
... and I can just paste this like it's the first line of the .txt file? i think I'm not putting this in the txt file in the right format.. I'll try this though..

Thanks, jim.. appreciate your help!

-Dylan
 
A couple of extra points:[ul]
[li]Jim gave you the escape sequence to select Courier at 8 characters-per-inch (which is quite large); perhaps what you actually want is 8 point (equivalent to 15 cpi for this font) for which you would need "<esc>(s0p15h0s0b4099T" (without the quotes).[/li]
[li]The escape character (shown variously as {ESC} or <esc> in the posts) represents the character with decimal code 27 (equivalent to hexadcimal code 1b).[/li]
[/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top