0

我需要打印一个适合页面的标签。我正在尝试这个,但打印比页面大,宽度和高度似乎太多了

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++;
}
4

1 回答 1

0

根据PrintPageEventArgs.PageBounds 上的 MSDN 文档

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

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

于 2011-05-14T11:50:41.330 回答