TIP: Click on subject to list as thread! ANSI
echo: clipper
to: ANDRE KHURY
from: ERIC STUY
date: 1997-12-29 10:01:00
subject: Printer codes for HP desk

Hello Andre!
Tuesday September 09 1997, Andre Khury writes to All:
 AK> I wounder if someone could help me in this problem. I'm trying to send
 AK> the printcodes chr( 15 ) and chr( 18 ) in order to make the HP Deskjet
 AK> printer works with normal and compressed caracters. However, it's not
 AK> working! All I get is strange caracters printed on the paper after the
 AK> PRINTCODES( CHR( 15 ) ) or DevOut( Chr( 15 ) ) and no compressing at
 AK> all.
 AK> How can I make it succeed? Any of you have had any experience with
 AK> this?
For example in the beginning of the prg :
#define  RESET        "E"
#define  A4PAGE       "&l26A"
#define  PC8          "(10U"
#define  NORMAL       "(s0B"
#define  BOLD         "(s3B"
#define  GOTHIC       "(s6T"
#define  COURIER      "(s3T"
#define  COMPRESSED   "(s12H"
#define  UNCOMPRESSED "(s10H"
then, somewhat further on (after error checking etc. ) :
@ 0, 0 say (RESET + A4PAGE + PC8 + NORMAL + GOTHIC + COMPRESSED)
@ prow()     ,  8 say NORMAL + "This is a test"
@ prow()     , 50 say BOLD + "Another test"
@ prow() +  1,  8 say NORMAL + "Nice testing hey ?"
@ prow() + 10, 95 say "Date : " + UNCOMPRESSED + dtoc(date()) + "."
sendcodes(RESET)
set device to screen
set printer to
set console on
tone(1000, 1)
@ 10, 4 clear to 12,75
@ 10, 5 say "End printing"
inkey(4)
endif
function sendcodes(code)
local nrow := prow()
local ncol := pcol()
?? code
setprc(nrow, ncol)
return ""
This is somewhat a short fraction of my code, but it works for me ...
if you need more code or help, contact me through internet :
eric.stuy@mail.interpac.be.
Bye for now.
Eric
--- GoldED 2.40
---------------
* Origin: * { || Clipperians do it with codeblocks } * (2:292/858.15)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.