C# を使用してゼブラ ラベル プリンターでラベルとバーコードを印刷する必要があります。私は以前にそれらを使用したことはありませんが、それを行う方法を読んで理解しようとしました. そして、 http://support.microsoft.com/kb/322091からこのコードに出くわしましたが、うまくいきませんでした。私の試行から、データをプリンターに送信できたことがわかりますが、応答して印刷しません。KB記事と同じように、ボタンを使用してコマンドをプリンターに送信しています。
private void ConnectButton_Click(object sender, EventArgs e)
{
// Allow the user to select a printer.
string s = "B26,26,0,UA0,2,2,152,B,\"{0}\"";
PrintDialog pd = new PrintDialog();
pd.PrinterSettings = new PrinterSettings();
if (DialogResult.OK == pd.ShowDialog(this))
{
// Send a printer-specific to the printer.
RawPrintrHelper.SendStringToPrinter(pd.PrinterSettings.PrinterName,s);
MessageBox.Show("Data sent to printer.");
}
}