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