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

ESCAPE CODES FOR LASER PRINTERS 1

Status
Not open for further replies.

arainfor

Programmer
Jun 14, 2001
14
0
0
ES
DOES ANYBODY KNOW OF ESCAPE CODES FOR LASER PRINTERS?
e.g.:
send escape code for tahoma font to laser HP1100

Thanks
 
Why not contact HP (www.hp.com) and try to get a manual for the printer from them? the escape sequence should be in there. The only sequences I use is to turn on/off compression, bold and underline.
 
On some HP printers, if you get it to print a font list it may include the codes to select that font. You will only be able to select internal or card fonts though.

For example
<esc>(s0p<point size>v0s0b4101T
will select CG Times on a LaserJet 4Plus

Note, however, if you select a proportional font you will need to handle word wrap manually if you want it to look right. This is a nightmare (I think so anyway!).

Hope this helps.
 
I'm using next code, but can you use to file driver.

sorry my bad english.

i wait help you.

Function rFont(cType, nPar1)
Local __nf := 0
Local aSets := {}
If ( !lPrinting )
Return ( &quot;&quot; )
EndIf
Do Case
Case ( cPrinter == &quot;DirectPrint&quot; )
Return ( Nil )
Case ( cPrinter == &quot;EpsonPVt88&quot; )
//para epson t88p p.vta. t‚rmico
aSets := { {&quot;Normal&quot;, Chr(8)},;
{&quot;Comprimido&quot;, Chr(15)},;
{&quot;Expandido&quot;, Chr(14)},;
{&quot;AltoDoble&quot;, CHR(27) + &quot;!&quot; + CHR(27) + Chr(0)},;
{&quot;AltoNormal&quot;, CHR(27) + &quot;­&quot; + CHR(27) + Chr(64)},;
{&quot;Cancelar&quot;, CHR(64) + &quot;­&quot; + CHR(27) + Chr(64)},;
{&quot;Cortador&quot;, Chr(27) + 'i'} ;
}
Case ( cPrinter == &quot;IBMProPrinter&quot; )
//para epson t88p p.vta. t‚rmico
aSets := { {&quot;Normal&quot;, Chr(18)},;
{&quot;10Cpi&quot;, Chr(18)},;
{&quot;Comprimido&quot;, Chr(15)},;
{&quot;Expandido&quot;, Chr(14)},;
{&quot;AltoDoble&quot;, CHR(27) + &quot;!&quot; + CHR(27) + Chr(0)},;
{&quot;AltoNormal&quot;, CHR(27) + &quot;­&quot; + CHR(27) + Chr(64)},;
{&quot;Cancelar&quot;, CHR(64) + &quot;­&quot; + CHR(27) + Chr(64)},;
{&quot;Cortador&quot;, Chr(27) + 'i'} ;
}
Case ( cPrinter == &quot;HPLaser&quot; )
aSets := { {&quot;Normal&quot;, &quot;&k0S&quot; },;
{&quot;Comprimido&quot;, &quot;&k2S&quot; },;
{&quot;Expandido&quot;, Chr(14)},;
{&quot;SubrayadoOn&quot;, CHR(27) + &quot;&dD&quot;},;
{&quot;SubrayadoOff&quot;,CHR(27) + &quot;&d@&quot;},;
{&quot;AltoDoble&quot;, CHR(27) + &quot;!&quot; + CHR(27) + Chr(0)},;
{&quot;#Copias&quot;, CHR(27) + &quot;&l1X&quot;},;
{&quot;Test&quot;, CHR(27) + &quot;z&quot; },;
{&quot;Cancelar&quot;, Chr(27) + 'E'} ;
}
EndCase
If ( (__nf := aScan(aSets, {|f| f[1] == cType})) <> 0 )
QQOut(aSets[__nf][2])
End
Return ( &quot;&quot; )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top