skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Tools
    ThemeBuilder
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

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
System.Object
RadPrintDocument
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

Gets or sets the font of the page footer.

Declaration
public Font FooterFont { get; set; }
Property Value
System.Drawing.Font

FooterHeight

Gets or sets the height of the header area.

Declaration
public int FooterHeight { get; set; }
Property Value
System.Int32

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

Gets or sets the text that will be printed near the bottom left corner of the page.

Declaration
public string LeftFooter { get; set; }
Property Value
System.String

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

Gets or sets the text that will be printed at the bottom center of the page.

Declaration
public string MiddleFooter { get; set; }
Property Value
System.String

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

[true] if the LeftFooter and RightFooter should be reversed on even pages, [false] otherwise.

Declaration
public bool ReverseFooterOnEvenPages { get; set; }
Property Value
System.Boolean

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

Gets or sets the text that will be printed near the bottom right corner of the page.

Declaration
public string RightFooter { get; set; }
Property Value
System.String

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

Declaration
public RadPrintWatermark Watermark { get; set; }
Property Value
RadPrintWatermark

Methods

HasLogoInHeaderFooterString(String)

Declaration
protected bool HasLogoInHeaderFooterString(string s)
Parameters
System.String s

Returns
System.Boolean

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)

Parses a given string for special words.

Declaration
protected string ParseHeaderFooterString(string s)
Parameters
System.String s

The string.

Returns
System.String

The parsed string.

PrintFooter(PrintPageEventArgs)

Prints the footer part of the page.

Declaration
protected virtual void PrintFooter(PrintPageEventArgs args)
Parameters
System.Drawing.Printing.PrintPageEventArgs args

The printing arguments.

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.

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.