這是我的代碼,當我從localhost調用此代碼,打印機工作,但從陽極 知識產權noting。我認爲DrawImage功能不工作。誰可以幫助我。我檢查正確創建的Bitmap對象和Image存在。問題與e.Graphics.DrawImage()
protected void printButton__Click(object sender, EventArgs e)
{
System.Drawing.Printing.PrintDocument document =
new System.Drawing.Printing.PrintDocument();
document.PrintPage += new PrintPageEventHandler(document_PrintPage);
document.Print();
}
void document_PrintPage(object sender, PrintPageEventArgs e)
{
string s = Server.MapPath("Temp.jpg");
Bitmap objBmpImage = new Bitmap(s);
e.Graphics.DrawImage(objBmpImage, 10, 10, 200, 100);
}
許多開放的問題...... Server.MapPath做什麼...你是什麼意思與「來自另一個IP」... – Bobby 2009-11-26 11:09:49
檢查字符串的值在你的代碼...可能會給你一些線索 – TimothyP 2009-11-26 11:11:16