2

Hi I have installed Star TSP100 Cutter (TSP143) printer driver in my system and tested the printer, Its printing everything. But Now i want to handle the printer through code in c# such as cut paper, Open Printer, Print normal etc.. I have used the below code to instantiate the printer. When i query for the printer it returns null.

Any suggestions or help if i am going in wrong way. Thanks

public static DeviceCollection GetPrinters()
    {
        PosExplorer explorer = new PosExplorer();
        return explorer.GetDevices(DeviceType.PosPrinter, DeviceCompatibilities.OposAndCompatibilityLevel1);
    }

    public static DeviceInfo GetPrinter(string name)
    {
        if (String.IsNullOrEmpty(name))
            return null;

        PosExplorer explorer = new PosExplorer();
        return explorer.GetDevice(DeviceType.PosPrinter, name);
    }
PosExplorer explorer = null;
                DeviceInfo device = null;
                PosPrinter printer = null;
                DeviceCollection printers = GetPrinters();

                DeviceInfo printers2 = GetPrinter("Star TSP100 Cutter (TSP143)");
Josh Anderson
  • 438
  • 3
  • 7
Amish Kumar
  • 259
  • 1
  • 3
  • 20

1 Answers1

1

It sounds like the incorrect command is being sent. The TSP100 differs from the rest of the printers in Star's line up. It needs to receive raster commands. The other printers generally accept line mode by default.

Reference their programming manual here: http://www.starmicronics.com/support/Mannualfolder/linemode_cm_en.pdf

Page 87: Shows you how to initialize raster mode

Page 90: Cash Drawer

Page 92: Feed/Cut

LtH
  • 692
  • 7
  • 18
  • I have resolved the issue by reinstalling the POS for .Net v1.12.. Now it is finding the printer but logically.. Now I have attached the printer into the system and installed the driver of that printer. Now how can i print physically using POS explorer.. – Amish Kumar Jul 11 '12 at 14:38