Actually, it's DOSPrinter that allows you to embed graphics in the
document. If you read the documentation from that link, it tells you
how to do this. In a nutshell, there are a few options but the way I
do it is to place:
<esc>"graphic_name"
in the document at the place you want the graphic to be. Note that
<esc> is char(27).
You can generate the document so that it ends up in the jBASE spooler
under a form queue that is created like this:
SP-CREATE CANON PROG c:\home\bin\jspool.exe Canon_i850
Here's the 'jspool.b' code that uses DOSPrinter:
0001 PROGRAM jspool
0002 INCLUDE JBC.h
0003 id = CHANGE(UNIQUEKEY(),'/',']2F')
0004 tempdirname = 'c:\temp'
0005 OPENSEQ tempdirname:DIR_DELIM_CH:id TO outstream ELSE
0006 CREATE outstream ELSE NULL
0007 END
0008 args = SYSTEM(1000) ;* addl parameters (like
printername, cpi, lpi, font, etc)
0009 printername = args<2>
0010 cpi = args<3>
0011 IF cpi = '' THEN cpi = 10
0012 LOOP
0013 numchars = SYSTEM(14)
0014 WHILE numchars DO
0015 INPUT line, numchars
0016 line := CHAR(13)
0017 WRITESEQ line ON outstream ELSE NULL
0018 REPEAT
0019 WEOFSEQ outstream ELSE NULL
0020 CLOSESEQ outstream
0021 cmd = "C:\Software\DOSPrinter\DOSPrinter.exe /DEL
/SEL'":printername:"' /CPI":cpi:' '
0022 cmd := tempdirname:DIR_DELIM_CH:id
0023 EXECUTE CHAR(255):'k':cmd
If you are on jBASE 3.x then you would need to:
a) change line 3 to something like this:
id = SYSTEM(21):'_':DATE():'_':TIME():'_':SYSTEM(9):'_':RND(32000)
b) change the OPENSEQ lines 5 thru 7 (inclusive) to:
OPENSEQ tempdirname:DIR_DELIM_CH:id TO outstream NULL
c) make sure 'openseq_creates = true' is set in your 'Config_EMULATE'
file under the appropriate emulation section
And, of course, line 21 should be changed to something that makes
sense on your system
You'll note that the code automagically removes the temp file when it
is done despooling.
DOSPrinter has a robust array of printing options, and all for just 40
smackers for a single user.***
Dan
***Note that I am in no way affiliated with this product, nor do I
receive any kickbacks. I just like it cos it works well and does what
the docs say it does, which is more than I can say for a lot of other
commercial software out there.