Running into an issue. I set it up as you said tweaking the program to 
match my system. When I send a job to the new printer it does run the 
jspool program but nothing is being passed. i know this because I have 
jspool writing out the numchars value to a file and it comes up with 
zero each time. What would cause the spooled data to not pass to the 
jspool program? I assume I send it like normal by doing the printer on 
and print statements. Program below:

001 OPEN '','MD' TO MD ELSE STOP
002   PROMPT ''
003      INCLUDE JBC.h
004      id = SYSTEM(21):'_':DATE():'_':TIME():'_':SYSTEM(9):'_':RND(32000)
005      tempdirname = 'c:\temp'
006      OPENSEQ tempdirname:DIR_DELIM_CH:id TO outstream ELSE NULL
007      args = SYSTEM(1000)       ;* addl parameters (like
008      printername = args<2>
009      LOOP
010          numchars = SYSTEM(14)
011 WRITE numchars ON MD,'XXXNUM'
012      WHILE numchars DO
013          INPUT line,numchars
014          line=line:CHAR(13)
015          WRITESEQ line ON outstream ELSE NULL
016      REPEAT
017      WEOFSEQ outstream ELSE NULL
018      CLOSESEQ outstream
019      cmd = "C:\DARTSCD\DOSPrinter\DOSPrinter.exe /SEL'":printername:"' "
020      cmd=cmd:' /DEL ':tempdirname:DIR_DELIM_CH:id
021      EXECUTE CHAR(255):'k':cmd
022      END

program doing the printing:

001 PRINTER ON
002 PRINT 'HELLO'
003 PRINT 'HOW ARE YOU'
004 PRINT CHAR(27):'C:\SIGNATURES\836-1.BMP'
005 PRINT 'HELLO AGAIN'
006 PRINTER OFF
007 PRINTER CLOSE
008 END

the above is run after assigning the GPRINT printer specs below::

FormQueue :GPRINT     (DEVCONFIG*1)
  Status  :ASSIGNED  (6)
  DevType :PROG  (2)
  DevName :C:\CWS\DEMO\BIN\JSPOOL.EXE HPLJ6
  LockPid :2320
  Created :DEMO  0  03 JUL 2009  12:42:59
  Stop Reason  :


Daniel Klein wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to