-1

I'm trying to print a document in C#. However, the Black color of the text isn't good. It's dim. How can I adjust the quality of the text color in order to make it darker and clearer? Here is my code :

 Font font = new Font("Courier New", 18);
 SolidBrush brush = new SolidBrush(Color.Black);

 graphic.DrawString(DateTime.Now.ToString("dd/MM/yy"), font, brush,10,10);

Any help is appreciated ! Thanks !

Ed Gibbs
  • 25,924
  • 4
  • 46
  • 69
Phi Nguyen
  • 3,046
  • 14
  • 26
  • It doesn't get more black than `Black`. Get a better printer or change your font with a more *meaty* font as suggested by @SteveFreg. – dotNET Jul 19 '15 at 05:40
  • Check the default settings in your printer driver! – TaW Jul 19 '15 at 07:55

2 Answers2

1

Instead of using Courier New, use another font like Arial Black or Copperplate Gothic Bold

SteveFerg
  • 3,466
  • 7
  • 19
  • 31
1
//for more clearer rendering of text use
graphic.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;

//for darker font use BOLD font style
Font font = new Font("Courier New", 18,FontStyle.Bold);

So your code becomes

 graphic.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
 Font font = new Font("Courier New", 18,FontStyle.Bold);
 SolidBrush brush = new SolidBrush(Color.Black);

 graphic.DrawString(DateTime.Now.ToString("dd/MM/yy"), font, brush,10,10);
Aladdin
  • 339
  • 1
  • 2
  • 15