Printing of images

  • Thread starter Thread starter Hartl_D
  • Start date Start date
H

Hartl_D

Guest
Hallo,

I want to print an image from type Windows.Control or Windows.Drawing. If i print the image directly via the following code, the image will be blurred. If i convert it to an PDF by ‘Microsoft PDF Converter’ and then print, the image will be clearer. What can I do that the image will be clearer if I print directly (sending to printer without converting)?





PrintDocument pd = new PrintDocument();
pd.PrintPage += Pd_PrintPage;
pd.Print();

private void Pd_PrintPage(object sender, PrintPageEventArgs e)
{

var pd = sender as PrintDocument;
Rectangle m = new Rectangle(10,10, (int)pd.PrinterSettings.DefaultPageSettings.PrintableArea.Height-10, (int)pd.PrinterSettings.DefaultPageSettings.PrintableArea.Width-10);
e.Graphics.DrawImage(image, m);
}

Continue reading...
 
Back
Top