【问题标题】:reduce the font size while printing using OPOS printer for receipt使用 OPOS 打印机打印收据时减小字体大小
【发布时间】:2012-08-30 03:28:24
【问题描述】:

我们如何在使用 OPOS 打印机打印时减小文本/字体的大小? 我正在使用爱普生打印机和以下软件组件来完成这项工作。

  • .Net 的 OPOS ADK
  • .Net 的 Microsoft POS

用于打印一行的命令是

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

是否有任何用于减小字体大小的转义字符? RecLineChars 设置为 42。

【问题讨论】:

    标签: c# .net point-of-sale epson opos


    【解决方案1】:

    我们使用以下内容:

    // 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);
    

    【讨论】:

    • 我知道这个设置.. 但我想知道的是我们是否可以选择小于 1 的字体大小。即 0.5 之类的..
    • 我不认为这是可能的。如果你想要这样的东西,你应该通过图形打印。
    • @TutuGeorge 你找到解决方案了吗?
    猜你喜欢
    • 2023-03-09
    • 1970-01-01
    • 2023-02-23
    • 1970-01-01
    • 2017-09-29
    • 2012-01-07
    • 1970-01-01
    • 2013-07-05
    • 2013-03-06
    相关资源
    最近更新 更多