Greetings,
i have a little application which should be able to print single jpeg files to a network printer. Now the printing itself works but the problem is that the printer prints just the upper left quarter of the picture, no matter which picture i use. Typically the picture is 1800x1200 px and in jpeg format.
The code im using to print is the following:
protected void Button5_Click(object sender, EventArgs e)
{
PrintDocument doc = new PrintDocument();
doc.PrinterSettings.PrinterName = "KONICA MINOLTA C250/C250P PCL";
doc.PrintPage += this.Doc_PrintPage;
if(doc.PrinterSettings.IsValid)
doc.Print();
}
private void Doc_PrintPage(object sender, PrintPageEventArgs e)
{
float x = e.MarginBounds.Left;
float y = e.MarginBounds.Top;
e.Graphics.DrawImage((System.Drawing.Image)ShowImg(bild.ToolTip),x, y);
}
The ShowImg() function just returns a Bitmap with the picture from a network drive. Does anyone know why this strange behaviour happens?
Thanks in advance xen