Spread for ASP.NET 10 Product Documentation
PrintType Enumeration
Example Example 


Specifies the type of print range used to print the sheet.
Syntax
'Declaration
 
Public Enum PrintType 
   Inherits System.Enum
'Usage
 
Dim instance As PrintType
public enum PrintType : System.Enum 
Members
MemberDescription
All[0] Prints the entire sheet
CellRange[1] Prints the area specified by the PrintInfo.ColStart, PrintInfo.ColEnd, PrintInfo.RowStart, and PrintInfo.RowEnd properties
CurrentPage[2] Prints the current page of the sheet
PageRange[3] Prints the pages in the range specified by the PrintInfo.PageStart and PrintInfo.PageEnd properties
Example
This example uses the PrintType enumeration.
FarPoint.Web.Spread.PrintInfo prinf = new FarPoint.Web.Spread.PrintInfo();
prinf.BestFitCols = true;
prinf.BestFitRows = true;
prinf.Centering = FarPoint.Web.Spread.Centering.Both;
prinf.ColEnd = 10;
prinf.Colors = new System.Drawing.Color[] {
        System.Drawing.Color.Green,
        System.Drawing.Color.Yellow,
        System.Drawing.Color.Gold,
        System.Drawing.Color.Indigo,
        System.Drawing.Color.Brown};
prinf.ColStart = 0;
prinf.FirstPageNumber = 1;
prinf.Footer = "/g\"1\"/cl\"4\"This is Page /p of /pc Pages";
prinf.FooterHeight = 40;
prinf.Header = "/cl\"0\"Print Job For FarPoint Inc./n /n ";
prinf.HeaderHeight = 40;
prinf.Images = new System.Drawing.Image[] {
        System.Drawing.Image.FromFile("D:\\images\\point.jpg"),
        System.Drawing.Image.FromFile("D:\\images\\logo.gif"),
        System.Drawing.Image.FromFile("D:\\images\\icon.jpg")};
prinf.Margin = new FarPoint.Web.Spread.PrintMargin(10, 10, 10, 10, 20, 20);
prinf.Opacity = 50;
prinf.Orientation = FarPoint.Web.Spread.PrintOrientation.Landscape;
prinf.PageEnd = 5;
prinf.PageOrder = FarPoint.Web.Spread.PrintPageOrder.OverThenDown;
prinf.PageStart = 1;
prinf.PrintNotes = FarPoint.Web.Spread.PrintNotes.None;
prinf.PrintType = FarPoint.Web.Spread.PrintType.All;
prinf.RepeatColEnd = 10;
prinf.RepeatColStart = 1;
prinf.RepeatRowEnd = 10;
prinf.RepeatRowStart = 1;
prinf.RowEnd = 10;
prinf.RowStart = 1;
prinf.ShowBorder = false;
prinf.ShowColumnFooter = FarPoint.Web.Spread.PrintHeader.Show;
prinf.ShowColumnFooterEachPage = true;
prinf.ShowColumnHeader = FarPoint.Web.Spread.PrintHeader.Show;
prinf.ShowGrid = true;
prinf.ShowRowHeader = FarPoint.Web.Spread.PrintHeader.Show;
prinf.ShowSubtitle = true;
prinf.ShowTitle = true;
prinf.SmartPrintPagesTall = 1;
prinf.SmartPrintPagesWide = 1;
FarPoint.Web.Spread.SmartPrintRulesCollection prules = new FarPoint.Web.Spread.SmartPrintRulesCollection();
prules.Add(new FarPoint.Web.Spread.BestFitColumnRule(FarPoint.Web.Spread.ResetOption.None));
prinf.SmartPrintRules = prules;
prinf.UseMax = true;
prinf.UseSmartPrint = false;
prinf.ZoomFactor = 2;
FpSpread1.ActiveSheetView.PrintInfo = prinf;
Dim prinf As New FarPoint.Web.Spread.PrintInfo
prinf.BestFitCols = True
prinf.BestFitRows = True
prinf.Centering = FarPoint.Web.Spread.Centering.Both
prinf.ColEnd = 10
prinf.Colors = New Drawing.Color() {Drawing.Color.Green, Drawing.Color.Yellow, Drawing.Color.Gold, Drawing.Color.Indigo, Drawing.Color.Brown}
prinf.ColStart = 0
prinf.FirstPageNumber = 1
prinf.Footer = "/g""1""/cl""4""This is Page /p of /pc Pages"
prinf.FooterHeight = 40
prinf.Header = "/cl""0""Print Job For FarPoint Inc./n /n "
prinf.HeaderHeight = 40
prinf.Images = New System.Drawing.Image() {System.Drawing.Image.FromFile("D:\images\point.jpg"), System.Drawing.Image.FromFile("D:\images\logo.gif"), System.Drawing.Image.FromFile("D:\images\icon.jpg")}
prinf.Margin = New FarPoint.Web.Spread.PrintMargin(10, 10, 10, 10, 20, 20)
prinf.Opacity = 50
prinf.Orientation = FarPoint.Web.Spread.PrintOrientation.Landscape
prinf.PageEnd = 5
prinf.PageOrder = FarPoint.Web.Spread.PrintPageOrder.OverThenDown
prinf.PageStart = 1
prinf.PrintNotes = FarPoint.Web.Spread.PrintNotes.None
prinf.PrintType = FarPoint.Web.Spread.PrintType.All
prinf.RepeatColEnd = 10
prinf.RepeatColStart = 1
prinf.RepeatRowEnd = 10
prinf.RepeatRowStart = 1
prinf.RowEnd = 10
prinf.RowStart = 1
prinf.ShowBorder = False
prinf.ShowColumnFooter = FarPoint.Web.Spread.PrintHeader.Show
prinf.ShowColumnFooterEachPage = True
prinf.ShowColumnHeader = FarPoint.Web.Spread.PrintHeader.Show
prinf.ShowGrid = True
prinf.ShowRowHeader = FarPoint.Web.Spread.PrintHeader.Show
prinf.ShowSubtitle = True
prinf.ShowTitle = True
prinf.SmartPrintPagesTall = 1
prinf.SmartPrintPagesWide = 1
Dim prules As New FarPoint.Web.Spread.SmartPrintRulesCollection
prules.Add(New FarPoint.Web.Spread.BestFitColumnRule(FarPoint.Web.Spread.ResetOption.None))
prinf.SmartPrintRules = prules
prinf.UseMax = True
prinf.UseSmartPrint = False
prinf.ZoomFactor = 2
FpSpread1.ActiveSheetView.PrintInfo = prinf
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Web.Spread.PrintType

Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

FarPoint.Web.Spread Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.