使用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)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 下載次數 52,427|版本:2026.11剛剛發布