I have a SATO CG series Barcode Printer. I have developed a web application using VB.NET.
I was looking for the sample program explaining the generation of Barcode in VB and printing the Barcode in SATO Printer but couldn't get any.
I have a SATO CG series Barcode Printer. I have developed a web application using VB.NET.
I was looking for the sample program explaining the generation of Barcode in VB and printing the Barcode in SATO Printer but couldn't get any.
I you dont want to use any 3rd party library, you can send commands directly to printer to generate the barcodes. You dont need to generate barcode in VB and then send it to printer.
The trick to send commands to LPT1 and map the LPT1 to USB port
NET USE LPT1: \\[Computer-Name]\Printer /PERSISTENT:YES
as explained here
You can easily find the code for how to send commands directly to LPT1. For Example see here and here.
Here are example commands you need to print 0123456789 in Code128
<A>
<V>100<H>200<BG>031600123456789
<Q>2
<Z>
You need to read the reference document provided by SATO.
Also have a look at this.
use file handling like
Dim file As System.IO.StreamWriter
file = My.Computer.FileSystem.OpenTextFileWriter("f:\files\data.prn", False)
file.WriteLine("AEX0")
file.close()
Shell("f:\files\prn1.bat")
bat file code copy f:\files\data.prn lpt2
first fire net use lpt2:\machinname\printername to dos