Spread Silverlight Documentation
PaperKind Enumeration
Example Example 


Specifies the paper kind for the printed page.
Syntax
'Declaration
 
Public Enum PaperKind 
   Inherits System.Enum
'Usage
 
Dim instance As PaperKind
public enum PaperKind : System.Enum 
Members
MemberDescription
A2Specifies the paper size is 420mm * 594mm.
A3Specifies the paper size is 297mm * 420mm.
A3ExtraSpecifies the paper size is 322mm * 445mm.
A3ExtraTransverseSpecifies the paper size is 322mm * 445mm.
A3RotatedSpecifies the paper size is 420mm * 297mm.
A3TransverseSpecifies the paper size is 297mm * 420mm.
A4Specifies the paper size is 210mm * 297mm.
A4ExtraSpecifies the paper size is 235mm * 322mm.
A4PlusSpecifies the paper size is 210mm * 330mm.
A4RotatedSpecifies the paper size is 297mm * 210m.
A4SmallSpecifies the paper size is 210mm * 297 mm.
A4TransverseSpecifies the paper size is 210mm * 297mm.
A5Specifies the paper size is 148mm * 210mm.
A5ExtraSpecifies the paper size is 174mm * 235mm.
A5RotatedSpecifies the paper size is 210mm * 148mm.
A5TransverseSpecifies the paper size is 148mm * 210mm.
A6Specifies the paper size is 105mm * 148mm.
A6RotatedSpecifies the paper size is 148mm * 105mm.
APlusSpecifies the paper size is 227 mm * 356 mm.
B4Specifies the paper size is 250mm * 353mm.
B4EnvelopeSpecifies the paper size is 250 mm * 353 mm.
B4JisRotatedSpecifies the paper size is 364 mm * 257 mm.
B5Specifies the paper size is 176 mm * 250 mm.
B5EnvelopeSpecifies the paper size is 176 mm * 250 mm.
B5ExtraSpecifies the paper size is 201 mm * 276 mm.
B5JisRotatedSpecifies the paper size is 257 mm * 182 mm.
B5TransverseSpecifies the paper size is 182 mm * 257 mm.
B6EnvelopeSpecifies the paper size is 176 mm by 125 mm.
B6JisSpecifies the paper size is 128 mm by 182 mm.
B6JisRotatedSpecifies the paper size is 182 mm by 128 mm.
BPlusSpecifies the paper size is 305 mm by 487 mm.
C3EnvelopeSpecifies the paper size is 322mm × 445mm.
C4EnvelopeSpecifies the paper size is 229 mm by 324 mm.
C5EnvelopeSpecifies the paper size is 162 mm by 229 mm.
C65EnvelopeSpecifies the paper size is 114 mm by 229 mm.
C6EnvelopeSpecifies the paper size is 114 mm by 162 mm.
CSheetSpecifies the paper size is 17 in. by 22 in.
CustomSpecifies the paper size is defined by the user.
DLEnvelopeSpecifies the paper size is 110 mm by 220 mm.
DSheetSpecifies the paper size is22 in. by 34 in.
ESheetSpecifies the paper size is 34 in. by 44 in.
ExecutiveSpecifies the paper size is 7.25 in. by 10.5 in.
FolioSpecifies the paper size is 8.5 in. by 13 in.
GermanLegalFanfoldSpecifies the paper size is 8.5 in. by 13 in.
GermanStandardFanfoldSpecifies the paper size is 8.5 in. by 12 in.
InviteEnvelopeSpecifies the paper size is 220 mm by 220 mm.
IsoB4Specifies the paper size is 250 mm by 353 mm.
ItalyEnvelopeSpecifies the paper size is 110 mm by 230 mm.
JapaneseDoublePostcardSpecifies the paper size is 200 mm by 148 mm.
JapaneseDoublePostcardRotatedSpecifies the paper size is 148 mm by 200 mm.
JapaneseEnvelopeChouNumber3Specifies the paper size is Japanese Chou #3 envelope.
JapaneseEnvelopeChouNumber3RotatedSpecifies the paper size is Japanese rotated Chou #3 envelope.
JapaneseEnvelopeChouNumber4Specifies the paper size is Japanese Chou #4 envelope.
JapaneseEnvelopeChouNumber4RotatedSpecifies the paper size is Japanese rotated Chou #4 envelope.
JapaneseEnvelopeKakuNumber2Specifies the paper size is Japanese Kaku #2 envelope.
JapaneseEnvelopeKakuNumber2RotatedSpecifies the paper size is Japanese rotated Kaku #2 envelope.
JapaneseEnvelopeKakuNumber3Specifies the paper size is Japanese Kaku #3 envelope.
JapaneseEnvelopeKakuNumber3RotatedSpecifies the paper size is Japanese rotated Kaku #3 envelope.
JapaneseEnvelopeYouNumber4Specifies the paper size is Japanese You #4 envelope.
JapaneseEnvelopeYouNumber4RotatedSpecifies the paper size is Japanese You #4 rotated envelope.
JapanesePostcardSpecifies the paper size is 100 mm by 148 mm.
JapanesePostcardRotatedSpecifies the paper size is 148 mm by 100 mm.
LedgerSpecifies the paper size is 17 in. by 11 in.
LegalSpecifies the paper size is 8.5 in. by 14 in.
LegalExtraSpecifies the paper size is legal extra paper (9.275 in. by 15 in.). This value is specific to the PostScript driver and is used only by Linotronic printers in order to conserve paper.
LetterSpecifies the paper size is 8.5 in. by 11 in.
LetterExtraSpecifies the paper size is letter extra paper (9.275 in. by 12 in.). This value is specific to the PostScript driver and is used only by Linotronic printers in order to conserve paper.
LetterExtraTransverseSpecifies the paper size 9.275 in. by 12 in.
LetterPlusSpecifies the paper size is 8.5 in. by 12.69 in.
LetterRotatedSpecifies the paper size is 11 in. by 8.5 in.
LetterSmallSpecifies the paper size is 8.5 in. by 11 in.
LetterTransverseSpecifies the paper size is 8.275 in. by 11 in.
MonarchEnvelopeSpecifies the paper size is 3.875 in. by 7.5 in.
NoteSpecifies the paper size is 8.5 in. by 11 in.
Number10EnvelopeSpecifies the paper size is 4.125 in. by 9.5 in.
Number11EnvelopeSpecifies the paper size is 4.5 in. by 10.375 in.
Number12EnvelopeSpecifies the paper size is 4.75 in. by 11 in.
Number14EnvelopeSpecifies the paper size is 5 in. by 11.5 in.
Number9EnvelopeSpecifies the paper size is 3.875 in. by 8.875 in.
PersonalEnvelopeSpecifies the paper size is 3.625 in. by 6.5 in.
Prc16KSpecifies the paper size is 146 mm by 215 mm.
Prc16KRotatedSpecifies the paper size is 146 mm by 215 mm.
Prc32KSpecifies the paper size is 97 mm by 151 mm.
Prc32KBigSpecifies the paper size is 97 mm by 151 mm.
Prc32KBigRotatedSpecifies the paper size is 97 mm by 151 mm.
Prc32KRotatedSpecifies the paper size is 97 mm by 151 mm.
PrcEnvelopeNumber1Specifies the paper size is 102 mm by 165 mm.
PrcEnvelopeNumber10Specifies the paper size is 324 mm by 458 mm.
PrcEnvelopeNumber10RotatedSpecifies the paper size is 458 mm by 324 mm.
PrcEnvelopeNumber1RotatedSpecifies the paper size is 165 mm by 102 mm.
PrcEnvelopeNumber2Specifies the paper size is 102 mm by 176 mm.
PrcEnvelopeNumber2RotatedSpecifies the paper size is 176 mm by 102 mm.
PrcEnvelopeNumber3Specifies the paper size is 125 mm by 176 mm.
PrcEnvelopeNumber3RotatedSpecifies the paper size is 176 mm by 125 mm.
PrcEnvelopeNumber4Specifies the paper size is 110 mm by 208 mm.
PrcEnvelopeNumber4RotatedSpecifies the paper size is 208 mm by 110 mm.
PrcEnvelopeNumber5Specifies the paper size is 110 mm by 220 mm.
PrcEnvelopeNumber5RotatedSpecifies the paper size is 220 mm by 110 mm.
PrcEnvelopeNumber6Specifies the paper size is 120 mm by 230 mm.
PrcEnvelopeNumber6RotatedSpecifies the paper size is 230 mm by 120 mm.
PrcEnvelopeNumber7Specifies the paper size is 160 mm by 230 mm.
PrcEnvelopeNumber7RotatedSpecifies the paper size is 230 mm by 160 mm.
PrcEnvelopeNumber8Specifies the paper size is 120 mm by 309 mm.
PrcEnvelopeNumber8RotatedSpecifies the paper size is 309 mm by 120 mm.
PrcEnvelopeNumber9Specifies the paper size is 229 mm by 324 mm.
PrcEnvelopeNumber9RotatedSpecifies the paper size is 324 mm by 229 mm.
QuartoSpecifies the paper size is 215 mm by 275 mm
Standard10x11Specifies the paper size is 10 in. by 11 in.
Standard10x14Specifies the paper size is 10 in. by 14 in
Standard11x17Specifies the paper size is 11 in. by 17 in.
Standard12x11Specifies the paper size is 12 in. by 11 in.
Standard15x11Specifies the paper size is 15 in. by 11 in.
Standard9x11Specifies the paper size is 9 in. by 11 in.
StatementSpecifies the paper size is 5.5 in. by 8.5 in.
TabloidSpecifies the paper size is 11 in. by 17 in.
TabloidExtraSpecifies the paper size is 11.69 in. by 18 in.
USStandardFanfoldSpecifies the paper size is 14.875 in. by 11 in.
Example
This example uses the PaperKind enumeration.
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)
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         GrapeCity.Windows.SpreadSheet.Data.PaperKind

Requirements

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

See Also

Reference

GrapeCity.Windows.SpreadSheet.Data Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.