IRONSOFTWAREHOME
设置纸张方向
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)
NuGet Download
PM > Install-Package IronPrint
设置纸张方向

设置纸张方向

使用PaperOrientation属性控制文档是以纵向还是横向模式打印。 将其设置为PaperOrientation.Landscape会旋转可打印区域,使较长边水平运行——非常适合宽的表格,时间线和演示幻灯片。

方向调整在驱动程序层级进行,且在内容栅格化之前完成,因此整个页面布局会自动调整。 将此设置与PaperSize结合,精确控制内容如何填充物理纸张,避免不雅的裁剪或过多的空白。

了解如何使用 IronPrint 设置纸张方向

准备开始了吗?

Nuget Downloads 46,090版本:2026.9刚刚发布

Key in blue circle

立即获取免费的 30 天试用版密钥

Your trial license will be sent to your email address

无任何限制。100% 解锁。无需信用卡。

bullet_checked无需信用卡或创建账户无任何限制。100% 解锁。无需信用卡。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
预约您的免费现场演示
Booking Badge

深受全球数百万工程师信赖

Iron Software 的客户徽标
获取您的无义务咨询
填写下面的表格或通过sales@ironsoftware.com
您的资料将始终保密。
深受全球数百万工程师信赖
Iron Software 的客户徽标
立即获取您的免费30 天试用密钥
无需信用卡或创建账户