GrapeCity.Windows.SpreadSheet.Data Namespace > PrintInfo Class : Orientation Property |
'Declaration <System.ComponentModel.DefaultValueAttribute()> Public Property Orientation As PrintPageOrientation
'Usage Dim instance As PrintInfo Dim value As PrintPageOrientation instance.Orientation = value value = instance.Orientation
[System.ComponentModel.DefaultValue()] public PrintPageOrientation Orientation {get; set;}
SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.Filter = "PDF File (.pdf)|*.pdf"; bool? useClick = saveFileDialog.ShowDialog(); if (useClick == true) { var stream = saveFileDialog.OpenFile(); int i, j; for (i = 0; i <= 50; i++) { for (j = 0; j <= 20; j++) gcSpreadSheet1.ActiveSheet.SetValue(i, j, "test"); } GrapeCity.Windows.SpreadSheet.Data.PrintInfo printset = new GrapeCity.Windows.SpreadSheet.Data.PrintInfo(); printset.Orientation = GrapeCity.Windows.SpreadSheet.Data.PrintPageOrientation.Portrait; printset.PageOrder = GrapeCity.Windows.SpreadSheet.Data.PrintPageOrder.Auto; printset.PageRange = "1-3"; printset.PaperSize = new GrapeCity.Windows.SpreadSheet.Data.PaperSize(GrapeCity.Windows.SpreadSheet.Data.PaperKind.Letter); //printset.PaperSize = new GrapeCity.Windows.SpreadSheet.Data.PaperSize(600, 300); //printset.PaperSize = new GrapeCity.Windows.SpreadSheet.Data.PaperSize(); gcSpreadSheet1.Sheets[0].PrintInfo = printset; gcSpreadSheet1.SavePDF(stream, 0); stream.Dispose(); }
Dim saveFileDialog = New SaveFileDialog() saveFileDialog.Filter = "PDF File(.pdf)|*.pdf" Dim useClick As Boolean = saveFileDialog.ShowDialog() If (useClick = True) Then Dim stream = saveFileDialog.OpenFile() For i = 0 To 50 For j = 0 To 20 GcSpreadSheet1.ActiveSheet.SetValue(i, j, "test") Next j Next i Dim printset As New GrapeCity.Windows.SpreadSheet.Data.PrintInfo() printset.Orientation = GrapeCity.Windows.SpreadSheet.Data.PrintPageOrientation.Portrait printset.PageOrder = GrapeCity.Windows.SpreadSheet.Data.PrintPageOrder.Auto printset.PageRange = "1-3" 'printset.PaperSize = new GrapeCity.Windows.SpreadSheet.Data.PaperSize(GrapeCity.Windows.SpreadSheet.Data.PaperKind.Letter) printset.PaperSize = New GrapeCity.Windows.SpreadSheet.Data.PaperSize(600, 300) 'printset.PaperSize = new GrapeCity.Windows.SpreadSheet.Data.PaperSize() GcSpreadSheet1.Sheets(0).PrintInfo = printset GcSpreadSheet1.SavePDF(stream, 0)
Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6