I have what would appear to be a common question, but for the life of
me I can't find any answer other than net use which will not work for
me in my case. We're using PB 10.
What we have is an app that prints shipping labels to (strangely
enough) a label printer using the printer's own language. In this
case it's a Zebra printer so it's...ZCode or something like that.
When a user first connects the printer, they don't set up any drivers
but they do a 'setup' in the app which basically sends a set of format
commands down to the printer.
When a user prints labels (or even the format commands) what we do in
code is create a text file in our app directory and simply append to
it for each label we are creating. When done, we run a DOS command to
force the file out the lpt1 port: TYPE x.dat > LPT1
My problem is, the client is getting new laptops which do not have
parallel ports.
I've managed to get the net use option working, but that requires a
specific setup on the client machine and not all the users have admin
privleges (or in some cases no privs at all but the very basics) so
it's not an option for me.
I've tried the following:
printgetprinters() to get the printer name & port then....
i_result=printsetprinter('Zebra Z6M (200dpi) winspool Ne00:')
l_file = fileopen('c:\temp\ait2.dat')
filereadex(l_file, s_test)
fileclose(l_file)
l_print = printopen('Print MSL Data')
i_result=printsend(l_print, s_test, 124)
i_result=printclose(l_print)
And what came out the printer was a very damaged version of the
label. In the help it says printsend catches zeros as terminators so
I've updated my file with pipes instead which is ASCII 124.
It seems the data is still getting mangled on the way over so I'm at a
loss at this point.
Anyone have some suggestions?
Thanks in advance.
Connecting an MS-Dos Application to a Printer on a USB Port
on Windows 2000
http://www.decompile.com/dataflex/tips/usb_printer.htm
Unfortunately that's using net use. The client computers are essentially
locked down which is why we were printing direct in the first place since
they cannot add printers after the fact.
What I need is something that will literally take a file byte for byte and
just push it at a USB printer, bypassing all drivers so the printer deals
with the command codes embedded in the file itself. Everything I've tried
so far has gotten mangled on the way over to the printer.
<dawnbr...@teamsybase.com> wrote in message
news:46b235c8.23d...@sybase.com...
The less I need the users/admins to do the better.
"Steve" <nob...@home.com> wrote in message news:46b3171e$1@forums-1-dub...
Not sure if this is of any use but some time ago I had to
print to a networked intermec printer. What I did was to
print to a Windows text printer drive that refernced the
relevant network port. This could have easily been the USB
instead.
To get around the text drive butchering my crafted printer
commands I used something called PrintDirect. It was cheap
and royalty free to distribute. See the following site for
details:
http://www.direct-print.com/PrintDirect dll.htm
Hope this helps.
Regards
Graeme
I gave the print direct app a try with success!
What I need to do now is interface with their dll for testing. I have one
of our guys also trying to create a direct dll of our own now that we've
seen this work.
Did you need to wrap the dll for PB or is it already PB friendly?
Thanks
<Graeme Cooke> wrote in message news:46b33d90.3f0...@sybase.com...