使用PaperOrientation屬性來控制文件是否以直向或橫向模式列印。 將其設定為PaperOrientation.Landscape會旋轉可列印區域,使較長的邊緣水平排列——非常適合寬表格、時間軸和簡報幻燈片。
方向設置在內容光柵化之前於驅動程式層級應用,因此整個頁面佈局會自動調整。 將此設定與PaperSize結合使用,以精確控制內容如何填滿實體紙張,避免尷尬的裁剪或過多的空白。
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)使用PaperOrientation屬性來控制文件是否以直向或橫向模式列印。 將其設定為PaperOrientation.Landscape會旋轉可列印區域,使較長的邊緣水平排列——非常適合寬表格、時間軸和簡報幻燈片。
方向設置在內容光柵化之前於驅動程式層級應用,因此整個頁面佈局會自動調整。 將此設定與PaperSize結合使用,以精確控制內容如何填滿實體紙張,避免尷尬的裁剪或過多的空白。
Nuget Downloads 46,090|版本:2026.9剛剛發布