Dot Matrix printing in C#?

前端 未结 8 2058
南笙
南笙 2020-12-13 08:03

I\'m trying to print to Dot Matrix printers (various models) out of C#, currently I\'m using Win32 API (you can find alot of examples online) calls to send escape codes dire

相关标签:
8条回答
  • 2020-12-13 08:35

    First Convert the Sequence commands into character then pass to printer

    Example Bold Font 27,69

    string.Format("{0}{1}",Convert.ToChar(27),Convert.ToChar(69));

    Perhaps a bit shorter as:

    string.Format("{0}{1}",(char)(27),(char)(69));

    0 讨论(0)
  • 2020-12-13 08:36

    It appears that what I would like to do is not possible.

    My choices for printing are unmanaged direct to printer printing (using winspool.drv) which allows me to do whatever I like to the printer and allows me to easily line things up.VB.NET Example Or I can use GDI+ (System.Drawing.Printing) which is complicated to get things to line up but will work with non-dot matrix printers like XPS and PDF printers.

    0 讨论(0)
提交回复
热议问题