User manual

36
DOWNLOADING BMP & PCX SUPPLEMENT
(PCX not available on 22/24/26)
(BMP available on 46 Only)
BMP & PCX files are a commonly found format used by image and paint programs. These files can be
downloaded directly as is to the printer as long as they are preceded with a small FGL string. The only
restriction on the BMP & PCX file is that it must be saved in the 1-bit format. This is the normal format for non-
color images. The BMP or PCX file can be downloaded to the printer for use later on as a logo or it can be sent
as a PCX graphics file to be printed immediately. To print the BMP or PCX file immediately, send one of the
following command strings:
<SP#,#><pcx><G#>pcx bytes.
or
<SP#,#><bmp><G#>bmp bytes.
The bmp & pcx must be in lowercase letters. The <SP#,#> command positions the image. If no starting point is
sent, the image will start at point 0,0. The # in the G command is equal to the number of bytes in the entire
BMP or PCX file. After the <G#> you must send the actual BMP or PCX file. There must not be any extra
characters sent! For example, if the BMP or PCX file contained 3500 bytes you would send a <G3500>
command followed by the 3500 bytes.
To download the BMP or PCX file for use later on as a logo, follow the same procedure as above but send an
esc character (27d) both before and after the BMP or PCX data stream.
esc<pcx><G#>pcx bytes esc.
or
esc<bmp><G#>bmp bytes esc.
This image can then be printed using the normal logo printing commands like <SP20,20><LD1><p>. All BMP &
PCX images can be rotated, multiplied and scaled just like any FGL font.
This is a sample basic program that sends and prints a 1-bit pcx file to the printer.
10 CLS
20 PRINT:PRINT "WHICH OF THE FOLLOWING PORTS IS YOUR PRINTER CONNECTED TO?"
30 PRINT:PRINT "1=LPT1:"
40 PRINT "2=LPT2:"
50 PRINT "3=COM1:"
60 PRINT "4=COM2:"
70 PRINT:INPUT "ENTER NUMBER 1-4";PN$:PN=VAL(PN$)
80 IF PN < 1 OR PN > 4 THEN CLS:GOTO 20
90 CLS
100 ON PN GOTO 110,120,130,140
110 OPEN "LPT1:" AS #1:WIDTH #1,255:GOTO 150
120 OPEN "LPT2:" AS #1:WIDTH #1,255:GOTO 150
130 OPEN "COM1:9600,N,8,1,RS,DS60000" AS #1:GOTO 150
140 OPEN "COM2:9600,N,8,1,RS,DS60000" AS #1:GOTO 150
150 PRINT:INPUT "NAME OF PCX FILE YOU WANT TO PRINT";A$
160 OPEN "R",#2,A$,1
170 PRINT "DOWNLOADING FILE TO PRINTER ......."
180 W=LOF(2)
190 PRINT #1,"<pcx><G";W;">";
200 FIELD 2, 1 AS R$
210 FOR X=1 TO W
220 GET #2,X
230 PRINT #1,R$;
240 NEXT X
250 PRINT #1,"<p>";