2013-03-09 117 views
0

請我有發送打印命令標誌我eposon TM-T70打印機在C#.NET印刷LOGO,以Epson打印機

我用Google搜索,搜查一個問題,我想出了很多神祕的東西。最有用的是,我將需要發送以下命令

[Name] Print the specified NV graphics data. 

[Format] ASCII GS (L pL pH m fn kc1 kc2 x y 

Hex 1D 28 4C 06 00 30 45 kc1 kc2 x y 

Decimal 29 40 76 6 0 48 69 kc1 kc2 x y 

[Range] (pL + pH × 256) = 6 (pL = 6, pH = 0) 

m = 48 

fn = 69 

32 ≤ kc1 ≤ 126 

32 ≤ kc2 ≤ 126 

我不知道如何在C#和文檔中啓動此命令不幫助太多。您的幫助將不勝感激

+0

看一看[這個博客帖子(http://nicholas.piasecki.name/blog/2009/12/sending-a-bit-image-to-an-epson-tm-t88iii-收據打印機使用c和escpos /)由Nicholas Piasecki。 – stukelly 2013-03-26 21:46:28

回答

1

那麼下面的代碼將它發散。感謝@Skukelly

string GS = Convert.ToString((char)29); string ESC = Convert.ToString((char)27);

 //Assemble the paper cut command 
     string COMMAND = ""; 
     COMMAND = ESC + "@"; 
     COMMAND += GS + "V" + (char)1; 

     //Assemble the print logo command 

     String printCommand = ESC + "@"; 
     printCommand += GS; 

     printCommand += Convert.ToString((char)40); 
     printCommand += Convert.ToString((char)76); 
     printCommand += Convert.ToString((char)6); 
     printCommand += Convert.ToString((char)0); 
     printCommand += Convert.ToString((char)48); 
     printCommand += Convert.ToString((char)69); 
     printCommand += Convert.ToString((char)48); 
     printCommand += Convert.ToString((char)48); 
     //printCommand += (48).ToString(); 
     //printCommand += (48).ToString(); 
     printCommand += ((char)(1)).ToString(); 
     printCommand += ((char)(1)).ToString(); 

//END OF PRINT COMMAND