2011-05-14 116 views
0

我需要打印标签以适应页面。 我tryng这一点,但打印速度比页大,宽度和高度似乎是很多打印适合页面

private void PrinterPrintPage(object sender, PrintPageEventArgs e) 
{ 
    var b = Tasks.Pop(); 

    if (b.Label == null) 
     b.Label = GetLabelImage(b.Codice, b.ColoreID); 

    var rect = e.PageBounds; 
    e.Graphics.DrawImage(b.Label, rect); 
    e.HasMorePages = Tasks.ContainTasks(); 

    _printedCount++; 
} 

回答

0

MSDNs documentation on PrintPageEventArgs.PageBounds

大多数打印机无法在页面的最边缘打印。

...首先,请尝试将PageBounds更改为MarginBounds。如果这没有帮助,则将边界矩形“缩小”为页面中心,以便远离边缘。

+0

MarginBounds打印在一个嘲笑的小区域。这意味着我将为每台打印机获得不同的结果...... bud事情。谢谢aniway – 2011-05-14 11:57:39