CG> BW> This does not work for me. Remember, I said the
CG> BW> file was a binary file, not a text file. It was
CG> BW> created by telling WordPerfect to print to disk instead
CG> BW> of paper and the file will print properly in DOS using:
CG> If you are dealing with a WordPerfect "Print to disk" file,
CG> you need to use the
CG> equivalant of the DOS "TYPE filename > PRN" command. You also need
CG> to ensure the printer is initialized the way Word Perfect expects.
CG> If the WP file you are working with does not match your
CG> printer, that will make a mess of things.
CG> You'll need to open the file for BINARY, GET chunks of it,
CG> and send them as binary to the printer port. Don't forget
CG> your error traps so you don't overflow the printer's buffer.
You did it - or at least put me on the right
track. I was convinced my WordPerfect "print to disk"
file was correct because PRINT filename in DOS would
print it properly. And even QB's SHELL "PRINT filename"
was working when I returned to DOS. SHELL "Copy
filename PRN:" would work, but it insisted on giving a
form feed, even tho I had taken it out of the file with
Norton's disk editor. The final SUB looks like this:
-------------------------8<------------------------
SHELL "type printer.bin > PRN:"
FOR i = 1 TO 48
LPRINT " "
NEXT i
FOR i = 1 TO 10
LPRINT "Now is the time", i
NEXT i
LPRINT CHR$(12)
-------------------------8<------------------------
Without that first FOR/NEXT loop, the second one
was being printed starting at I=6. Much trial and
error found the figure 48 for the first loop - any more
and I've got blank lines. And something has to be
printed, LPRINT "" won't do it. I don't know why this
is necessary - and SLEEP didn't help.
Anyway, it works like I wanted it to, so THANKS!
FIDO: Bill White @ 1:135/110 (Miami)
InterNet: bill.white@110.sunshine.com
* SLMR 2.1a * I'm not crazy - the voices told me so!
--- Maximus 2.01wb
---------------
* Origin: Miami Amateur Computer Club BBS/USR Courier V.E (1:135/110)
|