Spread WPF Documentation
PaperSize Constructor(PaperKind)
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > PaperSize Class > PaperSize Constructor : PaperSize Constructor(PaperKind)
The paper size.
Creates a new paper size setting with the specified standard paper size.
Syntax
'Declaration
 
Public Function New( _
   ByVal kind As System.Drawing.Printing.PaperKind _
)
'Usage
 
Dim kind As System.Drawing.Printing.PaperKind
 
Dim instance As New PaperSize(kind)
public PaperSize( 
   System.Drawing.Printing.PaperKind kind
)

Parameters

kind
The paper size.
Example
This example specifies the size of the paper to print to.
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(System.Drawing.Printing.PaperKind.A4);
//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("c:\\zipfile\\test.pdf", 0);
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(System.Drawing.Printing.PaperKind.A4)
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("c:\zipfile\test.pdf", 0)
See Also

Reference

PaperSize Class
PaperSize Members
Overload List