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,787版本:2026.10刚刚发布

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 IronPrint
预约您的免费现场演示
Booking Badge

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

Iron Software 的客户徽标
获取您的无义务咨询
您的资料将始终保密。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
深受全球数百万工程师信赖
立即获取您的免费30 天试用密钥。
无需信用卡或创建账户
C# 用于 PDF 的 NuGet 库
通过 NuGet 安装

版本: 2026.10

PM > Install-Package IronPrint
nuget.org/packages/IronPrint/
  1. 在解决方案资源管理器中,右键点击引用,管理 NuGet 包
  2. 选择“浏览”并搜索“IronPrint”
  3. 选择包并安装
C# PDF DLL
下载 DLL

版本: 2026.10

  1. 下载并解压 IronPrint 到您的解决方案目录中的 ~/Libs 之类的位置
  2. 在 Visual Studio 解决方案资源管理器中,右键单击引用。选择“浏览”,“IronPrint.dll”

$999 起售