0

I have read a lot of similar questions about printing panels and its contents but i haven read any good answer, they just mention about the pixel difference of the printer and monitor. But how can I achive printing a simple text label with good resolution. This is what I have

private void panel1_Paint(object sender, PaintEventArgs e){

e.Graphics.DrawString(Qtylbl.Text, drawFont, drawBrush, Qtylbl.Location.X, Qtylbl.Location.Y);
e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
e.Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBilinear;
e.Graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
e.Graphics.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver;
e.Graphics.PixelOffsetMode =        System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
        e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; 
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
    {

        e.Graphics.DrawImage(memoryImage, 0, 0);


    }

this is drawn in a panel

MoralesJosue
  • 199
  • 1
  • 4
  • 16

0 Answers0