private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
Font font = new Font("Arial", 8, FontStyle.Regular);
e.Graphics.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
e.Graphics.DrawString("FIRST NAME" , myFont, Brushes.Black, 15, 90);
e.Graphics.DrawString("MIDDLE NAME", font, Brushes.Black, 15, 105);
e.Graphics.DrawString("LASTNAME", font, Brushes.Black, 15, 120);
e.Graphics.DrawString("ADDRESS", font, Brushes.Black, 15, 135);
e.Graphics.Flush();
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
float x = 0;
float y = 0;
e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
e.Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
e.Graphics.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
Bitmap bmp = new Bitmap(this.pictureBox1.Width, this.pictureBox1.Height);
this.pictureBox1.DrawToBitmap(bmp, new Rectangle(0, 0, this.pictureBox1.Width, this.pictureBox1.Height));
e.Graphics.DrawImage((Image)bmp, x, y);
}
print font word are not clear visible when i print picturebox image. i want clear font (like microsoft word or excel print) letters visible when i printing images. means good pixels anybody suggest me?