irfan sherief

irfan sherief

  • NA
  • 27
  • 4.7k

Printing a receipt

Dec 19 2018 10:18 PM
I have windows applications to print receipt
User type into Textbox: 
(example, name of the customer in regional language, Malayalam)
I try to print using printdocument cobject
 
But some lettes are not coming correctly
I try the following code
 
Font fnt10m = new Font("kartika", 20, GraphicsUnit.Point); 
e.Graphics.DrawString(txtDevotee.Text, fnt10m, Brushes.Black, x, y);
 
in the last statement , following error occurs
 
"System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.\r\n at System.Drawing.Graphics.CheckErrorStatus(Int32 status)\r\n at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)\r\n at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, Single x, Single y)\r\n at Charity.VazhipaduMaster.winPrintBill_PrintPage(Object sender, PrintPageEventArgs e) in G:\\Charity 211118\\VazhipaduMaster.cs:line 1701"
help me
 

Answers (3)