Spread Windows Forms 10.0 Product Documentation
PrintInfo Constructor(PrintInfo)
Example 


PrintInfo object on which to base new object
Creates a new PrintInfo object based on the specified PrintInfo object.
Syntax
'Declaration
 
Public Function New( _
   ByVal pi As PrintInfo _
)
'Usage
 
Dim pi As PrintInfo
 
Dim instance As New PrintInfo(pi)
public PrintInfo( 
   PrintInfo pi
)

Parameters

pi
PrintInfo object on which to base new object
Example
FarPoint.Win.Spread.PrintInfo pi = new
FarPoint.Win.Spread.PrintInfo();
FarPoint.Win.Spread.PrintMargin pm = new
FarPoint.Win.Spread.PrintMargin();
FarPoint.Win.Spread.SmartPrintRulesCollection rules = new
FarPoint.Win.Spread.SmartPrintRulesCollection();
rules.Add(new FarPoint.Win.Spread.ScaleRule(FarPoint.Win.Spread.ResetOption.None, 1, 2, 0.5));
rules.Add(new FarPoint.Win.Spread.BestFitColumnRule(FarPoint.Win.Spread.ResetOption.None));
pm.Left = 10;
pm.Right = 10;
pm.Top = 20;
pm.Bottom = 40;
pi.AbortMessage = "Do you want to cancel printing??";
pi.BestFitCols = true;
pi.BestFitRows = true;
pi.ColEnd = 20;
pi.ColStart = 1;
pi.FirstPageNumber = 1;
pi.Footer = "This is Page /p/nof /pc Pages";
pi.Header = "Print Job For /nFPT Inc.";
pi.JobName = "New Print Job";
pi.Margin = pm;
pi.Orientation = FarPoint.Win.Spread.PrintOrientation.Portrait;
pi.PageEnd = 5;
pi.PageOrder = FarPoint.Win.Spread.PrintPageOrder.Auto;
pi.PageStart = 1;
pi.Preview = false;
pi.Printer = "HP6L";
pi.PrintType = FarPoint.Win.Spread.PrintType.CellRange;
pi.RowEnd = 20;
pi.RowStart = 1;
pi.ShowBorder = false;
pi.ShowColor = false;
pi.ShowColumnHeader = FarPoint.Win.Spread.PrintHeader.Hide;
pi.ShowGrid = true;
pi.ShowPrintDialog = true;
pi.ShowRowHeader = FarPoint.Win.Spread.PrintHeader.Hide;
pi.ShowShadows = false;
pi.SmartPrintRules = rules;
pi.UseMax = False;
pi.UseSmartPrint = true;
pi.ZoomFactor = 2;
FarPoint.Win.Spread.PrintInfo clone = new
FarPoint.Win.Spread.PrintInfo(pi)
fpSpread1.ActiveSheet.PrintInfo = clone;
Dim pi As New FarPoint.Win.Spread.PrintInfo
Dim pm As New FarPoint.Win.Spread.PrintMargin
Dim rules As New FarPoint.Win.Spread.SmartPrintRulesCollection
rules.Add(New FarPoint.Win.Spread.ScaleRule(FarPoint.Win.Spread.ResetOption.None, 1, 2, 0.5))
rules.Add(New FarPoint.Win.Spread.BestFitColumnRule(FarPoint.Win.Spread.ResetOption.None))
pm.Left = 10
pm.Right = 10
pm.Top = 20
pm.Bottom = 40
pi.AbortMessage = "Do you want to cancel printing??"
pi.BestFitCols = True
pi.BestFitRows = True
pi.ColEnd = 20
pi.ColStart = 1
pi.FirstPageNumber = 1
pi.Footer = "This is Page /p/nof /pc Pages"
pi.Header = "Print Job For /nFPT Inc."
pi.JobName = "New Print Job"
pi.Margin = pm
pi.Orientation = FarPoint.Win.Spread.PrintOrientation.Portrait
pi.PageEnd = 5
pi.PageOrder = FarPoint.Win.Spread.PrintPageOrder.Auto
pi.PageStart = 1
pi.Preview = False
pi.Printer = "HP6L"
pi.PrintType = FarPoint.Win.Spread.PrintType.CellRange
pi.RowEnd = 20
pi.RowStart = 1
pi.ShowBorder = False
pi.ShowColor = False
pi.ShowColumnHeader = FarPoint.Win.Spread.PrintHeader.Hide
pi.ShowGrid = True
pi.ShowPrintDialog = True
pi.ShowRowHeader = FarPoint.Win.Spread.PrintHeader.Hide
pi.ShowShadows = False
pi.SmartPrintRules = rules
pi.UseMax = False
pi.UseSmartPrint = True
pi.ZoomFactor = 2
Dim clone As New FarPoint.Win.Spread.PrintInfo(pi)
FpSpread1.ActiveSheet.PrintInfo = clone
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

PrintInfo Class
PrintInfo Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.