设计销售点应用程序的收据 [英] designing reciepts for point of sale applications

查看:84
本文介绍了设计销售点应用程序的收据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我需要协助如何为杂货设计收据

我使用下面的代码,但它只在纸上打印物品而不允许我设计正确的收据任何协助将非常感谢。



< public void =mode =hold>

Hello guys i need assistance on how to design a reciept for grocery
I have used the code below but it only prints the items on a paper without allowing me to design a proper receipt any assistance will be highly appreciated.

<public void="" mode="hold">

{
            PrintDocument pd = new PrintDocument();
            printFont = new Font("Arial", 12);
            pd.PrintPage += new PrintPageEventHandler(PrintPage);
            pd.DefaultPageSettings.Landscape = true;
            pd.Print();
        }
        private void PrintPage(object sender, PrintPageEventArgs e)
        {

            bitmap = new Bitmap(this.listView1 .Width, this.listView1 .Height);
            listView1.DrawToBitmap(bitmap, this.listView1.ClientRectangle);
            e.Graphics.DrawImage(bitmap, new Point(70, 70));
        }

推荐答案

这实际上取决于打印机功能。如果是基于文本的打印机,则需要输出ESC / POS命令(对于大多数Receipt打印机)。如果打印机是光栅打印机,那么你可以像上面那样打印位图,但当然你需要格式化它。



无论如何你建议你寻找一个用于e / pos的图书馆或用于为你努力工作的光栅报告工具。



(例如GitHub上的ThermalDotNet(e / pos)或类似内容) 。
It really depends on the printer capabilities. If it's a text based printer you'll need to output ESC/POS Commands (for most Receipt printers). If the printer is a raster printer then you can print a bitmap as you have above but of course you'll need to format it.

I suggest in either case you look for a library for e/pos or reporting tool for raster that does the hard work for you.

(E.g. ThermalDotNet (e/pos) on GitHub or similar).


如果您的打印机具有图形模式并且您已安装驱动程序,请使用2D .NET图形工具。



最通用的方式:

  • 打印任何装饰顶部
If your printer has a graphics mode and you've the driver installed, use the 2D .NET graphics tools.

Most General Way:
  • Print whatever will be your decorative top
  • 打印行项目,总数等。
  • 打印装饰底部


这篇关于设计销售点应用程序的收据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆