使用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)使用PaperOrientation属性控制文档是以纵向还是横向模式打印。 将其设置为PaperOrientation.Landscape会旋转可打印区域,使较长边水平运行——非常适合宽的表格,时间线和演示幻灯片。
方向调整在驱动程序层级进行,且在内容栅格化之前完成,因此整个页面布局会自动调整。 将此设置与PaperSize结合,精确控制内容如何填充物理纸张,避免不雅的裁剪或过多的空白。
Nuget Downloads 46,090|版本:2026.9刚刚发布