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

color gray scale to a monochrome printer

Status
Not open for further replies.

jpogriff

Programmer
May 27, 2004
24
US
Any one have any luck print color gray scale to a monochrome printer. The hp shading just does not cut it...
 
There's 2 ways to print gray scale, the second is more effective.

1)using chr$(176) or 177 or 178.

2) Ec*c#g2P
#=1-100 % gray
2P= shaded (0=solid black,1=erase,3=crosshatch,5=current pattern.)

Color sequences are generally ignored by mono hp laser printers.



 
Buff1,

Thanks for the response. I have tried the 2) option, but this looks awful... Cross hatching is not the most profressional appearance. I am not familiar with chr(176) Is this a ~ solid shade? I will give it a shot..

I have read somewhere that they have sent a 3 plane of gray to a b&w printer.... Can't seem to find the reference.

Thanks,
James
 
176 177 178 are dos extended characters that are various
amounts of dots within the character there's another character like 197 or something (dont have it in front of me) that is solid colored so it would print black on mono.

Ec*c4g2P should work as a light shading
actually anything up to 50g or so should result in various shades of gray.
 
The <esc>*c#g2P sequence is actually only capable of 8 different shades. Values in between are mapped to one of the 8. I believe these are shown in the technical ref.



Jim Asman
 
If none of the predefined patterns (eight shading patterns, and six cross-hatch patterns) are suitable, you can always define your own shading pattern, and use that.

The chr(176), chr(177), etc. characters are only any use if you are selecting an appropriate symbol set which includes these Dos-extended characters (in those positions).
I would imagine that the majority of printing these days is done using a symbol set which matches the coded character set used by the host operating system; this implies symbol set 0N (= ISO 8859/1 Latin 1) for 8-bit encoding (or the 19U (= Windows-ANSI) 'superset' of 0N) and 18N (= Unicode) for 16-bit encoding.
 
10U will work for chr$(176,177,178). Im sure you are right about the 8 shades too. I have found it (ec#g2P) useful for
use with federal form. There's a third alternative though
it has only gray and black is the Tax Line Draw set (can be downloaded as a soft font to hp compatible laserjets) using the {} characters (the squiggly brackets not parens).
Some other character sets may have that too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top