使用PaperOrientation属性来控制文档是以纵向还是横向方向打印。 将其设置为PaperOrientation.Landscape旋转可打印区域,使较长边横向运行,非常适合宽表格、时间线和演示幻灯片。
方向调整在驱动程序层级进行,且在内容栅格化之前完成,因此整个页面布局会自动调整。 将此设置与PaperSize结合使用,以精确控制内容如何填充纸张,避免尴尬的裁切或过多的空白。
using IronPrint;
// Configure landscape orientation for wide documents
var settings = new PrintSettings
{
PaperOrientation = PaperOrientation.Landscape
};
Printer.Print("spreadsheet.pdf", settings);
Imports IronPrint
' Configure landscape orientation for wide documents
Dim settings As New PrintSettings With {
.PaperOrientation = PaperOrientation.Landscape
}
Printer.Print("spreadsheet.pdf", settings)Imports IronPrint
' Configure landscape orientation for wide documents
Dim settings As New PrintSettings With {
.PaperOrientation = PaperOrientation.Landscape
}
Printer.Print("spreadsheet.pdf", settings)使用PaperOrientation属性来控制文档是以纵向还是横向方向打印。 将其设置为PaperOrientation.Landscape旋转可打印区域,使较长边横向运行,非常适合宽表格、时间线和演示幻灯片。
方向调整在驱动程序层级进行,且在内容栅格化之前完成,因此整个页面布局会自动调整。 将此设置与PaperSize结合使用,以精确控制内容如何填充纸张,避免尴尬的裁切或过多的空白。
NuGet 下载量 52,427|版本:2026.11刚刚发布