RGuillermo
asked on
printing text as image
Hello Experts
I am printing a receipt using visual c sharp and an EPSON thermal POS printer.
In order to print the logo i am using the following lines that work just fine.
Bitmap bm1 = new Bitmap(pictureBox1.Width, pictureBox1.Height);
pictureBox1.DrawToBitmap(b m1, new Rectangle(0, 0, pictureBox1.Width, pictureBox1.Height));
e.Graphics.DrawImage(bm1, hx, hy, wi, he);
bm1.Dispose();
And because I used an image
I continue printing each line of text as animage
as follows.
// text
hy += (he+s2);wi = 300; he = 20;
Bitmap tit1 = new Bitmap(wi,he);
pictureBox5.DrawToBitmap(t it1, new Rectangle(0, 0, wi, he));
e.Graphics.DrawImage(tit1, hx , hy, wi , he);
tit1.Dispose();
the thing is that drawing text looses a little quality,
and the result Is not as clear as when I print text in text mode.
Is it possible, print just normal text after the logo in the same print document ?
or if I have to continue with this graphic mode what are the appropriate fonts to use when drawing text ?
this are the commands of my PRINT button
private void Button1_Click(object sender, EventArgs e)
{
PrintDialog pd = new PrintDialog();
PrintDocument doc = new PrintDocument();
doc.PrintPage += Doc_PrintPage;
pd.Document = doc;
doc.Print();
}
Please your help on this.
Regards!
Regards,
I am printing a receipt using visual c sharp and an EPSON thermal POS printer.
In order to print the logo i am using the following lines that work just fine.
Bitmap bm1 = new Bitmap(pictureBox1.Width, pictureBox1.Height);
pictureBox1.DrawToBitmap(b
e.Graphics.DrawImage(bm1, hx, hy, wi, he);
bm1.Dispose();
And because I used an image
I continue printing each line of text as animage
as follows.
// text
hy += (he+s2);wi = 300; he = 20;
Bitmap tit1 = new Bitmap(wi,he);
pictureBox5.DrawToBitmap(t
e.Graphics.DrawImage(tit1,
tit1.Dispose();
the thing is that drawing text looses a little quality,
and the result Is not as clear as when I print text in text mode.
Is it possible, print just normal text after the logo in the same print document ?
or if I have to continue with this graphic mode what are the appropriate fonts to use when drawing text ?
this are the commands of my PRINT button
private void Button1_Click(object sender, EventArgs e)
{
PrintDialog pd = new PrintDialog();
PrintDocument doc = new PrintDocument();
doc.PrintPage += Doc_PrintPage;
pd.Document = doc;
doc.Print();
}
Please your help on this.
Regards!
Regards,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you so much!