Visual Basic (Declaration) | |
---|---|
Public Property Header As String |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As PrintInfo Dim value As String instance.Header = value value = instance.Header |
C# | |
---|---|
public string Header {get; set;} |
Property Value
String containing the header text, which may include control characters (commands)Use this property to specify the contents and formatting of the header that appears on the top of printed pages.
You can customize the position and appearance of the header by using control commands as listed in Customizing the Printed Page Header or Footer. If you use multiple control commands, do not put spaces between them.
To print the sheet, use the FpSpread.PrintSheet method.
To customize the contents and appearance of a printed footer at the bottom of every page, use the Footer property.
To add images to the header, refer to the Images property. To specify colors to text in the header, refer to the Colors property.
C# | Copy Code |
---|---|
// Define the printer settings FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo(); printset.Colors = new Color[] {Color.Red, Color.Blue}; printset.Header = "Print Job For /nFPT Inc."; printset.Footer = "This is Page /p/nof /pc Pages"; printset.Images = new Image[] {Image.FromFile("D:\Corporate.jpg"), Image.FromFile("D:\Building.jpg")}; printset.RepeatColStart = 1; printset.RepeatColEnd = 25; printset.RepeatRowStart = 1; printset.RepeatRowEnd = 25; // Assign the printer settings to the sheet and print it fpSpread1.Sheets[0].PrintInfo = printset; fpSpread1.PrintSheet(0); |
Visual Basic | Copy Code |
---|---|
' Define the printer settings Dim printset As New FarPoint.Win.Spread.PrintInfo printset.Colors = New Color() {Color.Red, Color.Blue} printset.Header = "Print Job For /nFPT Inc." printset.Footer = "This is Page /p/nof /pc Pages" printset.Images = New Image() {Image.FromFile("D:\Corporate.jpg"), Image.FromFile("D:\Building.jpg")} printset.RepeatColStart = 1 printset.RepeatColEnd = 25 printset.RepeatRowStart = 1 printset.RepeatRowEnd = 25 ' Assign the printer settings to the sheet and print it FpSpread1.Sheets(0).PrintInfo = printset FpSpread1.PrintSheet(0) |
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
Reference
PrintInfo ClassPrintInfo Members
Footer Property