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. On Thu, Jul 2, 2009 at 8:55 PM, Richard Kann<[email protected]> wrote: > I will try it. What I found is if I log onto the windows account jbase runs > on it works. If I go on a different account it does not. But I did not try > the specif printer approach. > > I am assuming in order to use this I need to put the entire invoice in a > text file, write it out somewhere in windows and then print and delete it. > That is how print wizard works. > > It would be nice if jbase itself had a utility to print graphics files > within normal print statements. This way I would not have to re-write entire > programs to do this kind of printing. > > Daniel Klein wrote: > > I think you need to specify the destination printer. Here is an > example of what works for me: > > cmd = "C:\Software\DOSPrinter\DOSPrinter.exe /SEL'Canon_i850' > c:\temp\file.txt" > EXECUTE CHAR(255):'k':cmd > > Where 'Canon_i850' is the name of the printer; on my system it is the > network shared name. > > Dan > > > On Thu, Jul 2, 2009 at 5:38 PM, Richard Kann<[email protected]> wrote: > > > Thanks. One question though. It works in command prompt in windows, but when > I put it in a program it locks up and will not print. This is the code line. > Any ideas: > > EXECUTE CHAR(255):'k':'C:\TEMP\DOSPRINTER C:\TEMP\SAMPLE2.PRN' > > > Daniel Klein wrote: > > I use DOSPrinter for all of my printing needs. > http://www.geocities.com/DOSPrint/ > > It is especially handy when you have a GDI printer. > > And it is easy enough to integrate with the jBASE spooler. > > Dan > > > On Wed, Jul 1, 2009 at 6:40 PM, Richard Kann<[email protected]> wrote: > > > Hi All: > > I am trying to print a .bmp file (a signature capture) to a PCL inkjet > printer (Jbase version 3.4.x windows) at the bottom of an invoice. Has > anyone accomplished this before or knows how to do it? > > Richard Kann > Comp-Ware Systems, Inc. > > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24 To post, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en -~----------~----~----~----~------~----~------~--~---
