簡體   English   中英

使用OPOS打印機進行收據打印時減小字體大小

[英]reduce the font size while printing using OPOS printer for receipt

使用OPOS打印機進行打印時,如何減小文本/字體的大小? 我正在使用愛普生打印機和以下軟件組件來完成這項工作。

  • 適用於.Net的OPOS ADK
  • NET的Microsoft POS

用於打印行的命令是

m_Printer.PrintNormal(PrinterStation.Receipt, "\u001b|cA" + "noob is printing"+ "\n");

是否有任何用於減小字體大小的轉義字符? RecLineChars設置為42。

我們使用以下內容:

// Scale the font to OPOS (1 to 4)
int fontSize = (int)Math.Round((format.FontSize.Value - 5) / 5.0);
if (fontSize < 1)
    fontSize = 1;
if (fontSize > 4)
    fontSize = 4;
_printerText += string.Format("\x1B|{0}C", fontSize);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM