1

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.

vhu
  • 12,244
  • 11
  • 38
  • 48
Giri Dharan
  • 161
  • 4
  • 28
  • Maybe you'll be the first one to implement it using their [programming reference](https://www.satoamerica.com/uploads/files/datasheets/E%20Pro%20Programming%20Reference.pdf)... – wOxxOm Jul 28 '15 at 07:17
  • @wOxxOm Oh boy, that will be fun, 30 year old image format, examples in 50 year old language, all over even older interface :x – PTwr Jul 28 '15 at 07:42
  • Is there any way you can help me out by using c# or VB? – Giri Dharan Jul 28 '15 at 07:51
  • @GiriDharan You need to look for SATO Barcode Program Language (SBPL), it appears that there is no free solution available. [This library](http://www.neodynamic.com/products/printing/raw-data/aspnet-mvc/) seems to have what you are looking for (SBPL support). – PTwr Jul 28 '15 at 08:07

2 Answers2

0

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.

Community
  • 1
  • 1
MJ Khan
  • 1,696
  • 3
  • 21
  • 36
-1

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

Doliveras
  • 1,794
  • 2
  • 14
  • 30