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天試用金鑰
無需信用卡或帳戶建立