Class RadPrintDocument
Defines a reusable object that sends output to a printer and manages the whole printing process,
when printing from an application. Can be associated with any object that implements the interface.
Inheritance
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadPrintDocument : PrintDocument
Constructors
RadPrintDocument()
Declaration
public RadPrintDocument()
Fields
DatePrintedString
Declaration
public const string DatePrintedString = "[Date Printed]"
Field Value
System.String
|
LogoString
Declaration
public const string LogoString = "[Logo]"
Field Value
System.String
|
PageNumberString
Declaration
public const string PageNumberString = "[Page #]"
Field Value
System.String
|
TimePrintedString
Declaration
public const string TimePrintedString = "[Time Printed]"
Field Value
System.String
|
TotalPagesString
Declaration
public const string TotalPagesString = "[Total Pages]"
Field Value
System.String
|
UserNamePrintedString
Declaration
public const string UserNamePrintedString = "[User Name]"
Field Value
System.String
|
Properties
AssociatedObject
Gets or sets the object, associated with this document.
Declaration
public IPrintable AssociatedObject { get; set; }
Property Value
IPrintable
|
AutoPortraitLandscape
Declaration
public bool AutoPortraitLandscape { get; set; }
Property Value
System.Boolean
|
CurrentPage
Gets or sets the currently selected page. This page will be the first to be printed when the PrintRange is set to Current or Selection.
Declaration
public int CurrentPage { get; set; }
Property Value
System.Int32
|
FooterFont
FooterHeight
HeaderFont
Gets or sets the font of the page header.
Declaration
public Font HeaderFont { get; set; }
Property Value
System.Drawing.Font
|
HeaderHeight
Gets or sets the height of the header area.
Declaration
public int HeaderHeight { get; set; }
Property Value
System.Int32
|
IsPrinting
Indicates whether the printing process is running.
Declaration
public bool IsPrinting { get; }
Property Value
System.Boolean
|
Landscape
Declaration
public bool Landscape { get; set; }
Property Value
System.Boolean
|
LeftFooter
LeftHeader
Gets or sets the text that will be printed near the upper left corner of the page.
Declaration
public string LeftHeader { get; set; }
Property Value
System.String
|
Logo
Declaration
public Image Logo { get; set; }
Property Value
System.Drawing.Image
|
Margins
Declaration
public Margins Margins { get; set; }
Property Value
System.Drawing.Printing.Margins
|
MiddleFooter
MiddleHeader
Gets or sets the text that will be printed at the top center of the page.
Declaration
public string MiddleHeader { get; set; }
Property Value
System.String
|
PageCount
Gets the total page count. The value is populated when the printing process begins.
Declaration
public int PageCount { get; }
Property Value
System.Int32
|
PaperSize
Declaration
public PaperSize PaperSize { get; set; }
Property Value
System.Drawing.Printing.PaperSize
|
PaperSource
Declaration
public PaperSource PaperSource { get; set; }
Property Value
System.Drawing.Printing.PaperSource
|
PrintedPage
Gets the number of the page being printed. The value of this property changes during the printing process.
Declaration
public int PrintedPage { get; }
Property Value
System.Int32
|
ReverseFooterOnEvenPages
ReverseHeaderOnEvenPages
[true] if the LeftHeader and RightHeader should be reversed on even pages, [false] otherwise.
Declaration
public bool ReverseHeaderOnEvenPages { get; set; }
Property Value
System.Boolean
|
RightFooter
RightHeader
Gets or sets the text that will be printed near the upper right corner of the page.
Declaration
public string RightHeader { get; set; }
Property Value
System.String
|
SelectionLength
Gets or sets the count of the selected pages. This indicates how many pages will be printed when the PrintRange is set to Selection.
Declaration
public int SelectionLength { get; set; }
Property Value
System.Int32
|
Watermark
Methods
HasLogoInHeaderFooterString(String)
OnAssociatedObjectChanged()
Called when the associated printable object has changed.
Declaration
protected virtual void OnAssociatedObjectChanged()
OnBeginPrint(PrintEventArgs)
Declaration
protected override void OnBeginPrint(PrintEventArgs e)
Parameters
System.Drawing.Printing.PrintEventArgs
e
|
OnEndPrint(PrintEventArgs)
Declaration
protected override void OnEndPrint(PrintEventArgs e)
Parameters
System.Drawing.Printing.PrintEventArgs
e
|
OnPrintPage(PrintPageEventArgs)
Declaration
protected override void OnPrintPage(PrintPageEventArgs e)
Parameters
System.Drawing.Printing.PrintPageEventArgs
e
|
ParseHeaderFooterString(String)
PrintFooter(PrintPageEventArgs)
PrintHeader(PrintPageEventArgs)
Prints the header part of the page.
Declaration
protected virtual void PrintHeader(PrintPageEventArgs args)
Parameters
System.Drawing.Printing.PrintPageEventArgs
args
The printing arguments. |
PrintLogo(Graphics, Rectangle)
Declaration
protected virtual void PrintLogo(Graphics g, Rectangle rect)
Parameters
System.Drawing.Graphics
g
|
System.Drawing.Rectangle
rect
|
PrintWatermark(PrintPageEventArgs)
Prints the watermark of the page.
Declaration
protected virtual void PrintWatermark(PrintPageEventArgs args)
Parameters
System.Drawing.Printing.PrintPageEventArgs
args
The printing arguments. |