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 Condensed Report in FP DOS 2.6 in a Laser

Status
Not open for further replies.

espinosalex

Programmer
Jul 27, 2001
6
0
0
PA
HI, I'm wrting from Panama City (Central America)...I used to print a condensed report using a Panasonic KX-P1695..To set on condensed printing I add a report expression and write "CHR(15)" at the first line...After that I add all fields and text that I need..and It will print fine..Now I have a HP LaserJet III Printer and I change my first line with CHR(27)+"(s16.5H" (commad to set on condensed) but it does not work...Can anyone help me!!!!!
 
Are you printing through the Generic / Text Only printer driver, or through a Windows HP driver? The Windows driver will always "convert" characters to the graphics it prints with and not treat them as "escape" commands.

Rick
 
Other way is your escape code write to text file
and it copy to lpt1 before your report, for example:
set prin on
set prin to pitch.txt
set cons off
?? chr(27)+"(s16.5H"
set cons on
set prin to lpt1
set prin off
copy file pitch.txt to lpt1
repo form ...
Tesar (greeting from Czech - central Europe)
 
Rick, I'm printing through the Generic / Text Only printer driver and it still does not work!!!!
 
Tesar, When I copy text file to lpt1 before my report...I use a HP Lasser Jet III or Generic Text only as my printer driver...Thanks..Greetings from Panama....

 
Hola, soy de Peru. Espero te sirva
Yo uso :

salida era para ver si es por pantalla o impresora

IF SALIDA = 1
SET PRINT ON
SET DEVICE TO PRINT
SET MARGIN TO 10
A = CHR(27)+'&l1O'+CHR(27)+'10U'+CHR(27)+'(s0p16.67h8.5v0s0b0T'
?A
ELSE
SET DEVICE TO PRINT
SET PRINTER TO REPO01.TXT
ENDIF

.... el programa
al final restauro
&100 es portarit
&110 es landscape

8.5 es letra normal
16.67 es condensado


IF SALIDA = 1
A = CHR(27)+'&l0O'+CHR(27)+'10U'+CHR(27)+'(s0p10.00h8.5v0s0b0T'
? A
SET DEVICE TO SCREEN
SET PRINT OFF
ELSE
SET DEVICE TO SCREEN
SET PRINTER TO
MODI COMM REPO01.TXT NOEDIT
ERASE REPO01.TXT
ENDIF
RETURN
 
Muchas Gracias..me sirvio de mucho...Saludos a mis hermanos peruanos...
 
Maybe this Old DOS routine will give you some Ideas.
It uses the Pdrivers.dbf and P_Codes.dbf that ships with FPD.
You will have to located the 2 dbf's in the FoxPro directory and copy them into your foxpro path or where ever your other dbf's are.

The routine is designed to ask the user printer, pitch, mode, etc, they want , run to the pdrivers table to get the printer then to the P_Codes table to get the escape sequence. HP3&4 printers are in that old DOS table.
David W. Grewe
Dave@internationalbid.com
 
hi..
if you are using HP PCL5e driver, you can try the following:

?? CHR(27)+CHR(38)+CHR(107)+CHR(50)+CHR(83)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top