2

こんにちは、スター TSP100 カッター (TSP143) プリンター ドライバーをシステムにインストールし、プリンターをテストしました。しかし、今では、カット紙、プリンターを開く、通常の印刷などのC#のコードを使用してプリンターを処理したいと考えています。以下のコードを使用してプリンターをインスタンス化しました。プリンターを照会すると、null が返されます。

私が間違った方向に進んでいる場合は、何か提案や助けが必要です。ありがとう

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)");
4

1 に答える 1

1

間違ったコマンドが送信されているようです。TSP100は、Starのラインナップの他のプリンターとは異なります。ラスターコマンドを受信する必要があります。他のプリンタは通常、デフォルトでラインモードを受け入れます。

こちらのプログラミングマニュアルを参照してください:http://www.starmicronics.com/support/Mannualfolder/linemode_cm_en.pdf

ページ87:ラスターモードを初期化する方法を示します

ページ90:キャッシュドロワー

ページ92:フィード/カット

于 2012-07-11T08:20:28.927 に答える