IRONSOFTWAREHOME
設定紙張尺寸
using IronPrint;

// Set the paper size to A4
PrintSettings printSettings = new PrintSettings();
printSettings.PaperSize = PaperSize.A4;

Printer.Print("report.pdf", printSettings);
Imports IronPrint

' Set the paper size to A4
Dim printSettings As New PrintSettings()
printSettings.PaperSize = PaperSize.A4

Printer.Print("report.pdf", printSettings)
NuGet Download
PM > Install-Package IronPrint
設定紙張尺寸

設定紙張尺寸

PaperSize 屬性在 PrintSettings 類別中讓您可以指定列印作業的確切紙張尺寸。 在此範例中,尺寸設定為 PaperSize.A4,這是商業通信和官方文件中廣泛使用的國際標準(210 × 297 mm)。

IronPrint 支援多種內建尺寸 - 包括 Letter, Legal, A3 及其他 - 因此您可以匹配每個紙匣中裝載的紙張,而不必依賴於印表機驅動程式的預設值。 選擇正確的尺寸可以防止文件尺寸與實際紙張不符時發生截斷、意外縮放和紙張浪費。

請參見 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# NuGet PDF程式庫
安裝方法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這樣的位置在您的Solution目錄下
  2. 在Visual Studio解決方案資源管理器中,右鍵點擊引用。選擇瀏覽,"IronPrint.dll"

授權從$999