Hi Dears
I want to print text throu a termal printer of embedded device.I implement it's code in c# but it doen't print.please guide me any one that know
the below code lpt dll for printer and Nazanin.ttf is font that i will print my text
my code :
IntPtr dc = CreateDC("ltp.dll", "LTP", null, IntPtr.Zero);
Graphics g = Graphics.FromHdc(dc);
RectangleF rec=new RectangleF();
string str = "سلام";
Font font = new Font("Nazanin.ttf", 14f, FontStyle.Bold);
SizeF stringSize = g.MeasureString(str, font);
rec.X = 0;
rec.Y = 0;
rec.Width = stringSize.Width;
rec.Height = stringSize.Height;
g.DrawString(str, font , new SolidBrush(Color.Black),rec);
g.Dispose();