skip navigation
  • Product Bundles

    DevCraft

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

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class PivotGridPdfExport

Inheritance
System.Object
PivotGridPdfExport
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.Export
Assembly: Telerik.WinControls.PivotGrid.dll

Syntax

public class PivotGridPdfExport

Constructors

PivotGridPdfExport(RadPivotGrid)

Declaration
public PivotGridPdfExport(RadPivotGrid pivotGrid)
Parameters
RadPivotGrid pivotGrid

PivotGridPdfExport(RadPivotGridElement)

Declaration
public PivotGridPdfExport(RadPivotGridElement pivotGrid)
Parameters
RadPivotGridElement pivotGrid

Fields

DatePrintedString

Date when the exporting was started.

Declaration
public const string DatePrintedString = "[Date Exported]"
Field Value
System.String

LogoString

Allows to add logo to the header or footer.

Declaration
public const string LogoString = "[Logo]"
Field Value
System.String

PageNumberString

Number of the current page

Declaration
public const string PageNumberString = "[Page #]"
Field Value
System.String

TimePrintedString

Time when the printing was started.

Declaration
public const string TimePrintedString = "[Time Exported]"
Field Value
System.String

TotalPagesString

Total number of pages

Declaration
public const string TotalPagesString = "[Total Pages]"
Field Value
System.String

UserNamePrintedString

Username associated with the current thread (the current Windows login))

Declaration
public const string UserNamePrintedString = "[User Name]"
Field Value
System.String

Properties

BorderColor

Gets or sets the color of grid lines.

Declaration
public Color BorderColor { get; set; }
Property Value
System.Drawing.Color

CellBackColor

Gets or sets the background color of cells.

Declaration
public Color CellBackColor { get; set; }
Property Value
System.Drawing.Color

ColumnsLayoutType

Gets the layout type of pivot grid column container.

Declaration
public PivotLayout ColumnsLayoutType { get; set; }
Property Value
PivotLayout

DataCellsFont

Gets or sets the font of data cells.

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

DescriptorsBackColor

Gets or sets the background color of descriptor cells.

Declaration
public Color DescriptorsBackColor { get; set; }
Property Value
System.Drawing.Color

ExportFlatData

Gets or sets a value indicating whether to export flat data(collapsed rows and columns).

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

ExportSelectionOnly

Gets or sets a value indicating whether to export only selection.

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

ExportSettings

Gets or sets export settings.

Declaration
public PdfExportSettings ExportSettings { get; set; }
Property Value
PdfExportSettings

ExportVisualSettings

Gets or sets a value indicating whether the visual settings should be exported.

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

true if visual settings are exported; otherwise, false.

FitToPageWidth

Gets or sets a value indicating whether the content of page should fit into the page width. Default value is true.

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

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 footer height.

Declaration
public double FooterHeight { get; set; }
Property Value
System.Double

GrandTotalsBackColor

Gets or sets the background color of grandtotal cells.

Declaration
public Color GrandTotalsBackColor { get; set; }
Property Value
System.Drawing.Color

HeaderCellsFont

Gets or sets the font of header cells.

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

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 header height.

Declaration
public double HeaderHeight { get; set; }
Property Value
System.Double

HeadersBackColor

Gets or sets the background color of header cells.

Declaration
public Color HeadersBackColor { get; set; }
Property Value
System.Drawing.Color

LayoutType

Gets the layout type of pivot grid row container.

Declaration
public PivotLayout LayoutType { get; }
Property Value
PivotLayout

LeftFooter

Gets or sets the text that will be exported 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 exported near the upper left corner of the page.

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

Logo

Gets or sets the header/footer logo.

Declaration
public Image Logo { get; set; }
Property Value
System.Drawing.Image

MiddleFooter

Gets or sets the text that will be exported 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 exported at the top center of the page.

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

PageMargins

Gets or Sets the margins of pages that will be exported in millimeters.

Declaration
public Padding PageMargins { get; set; }
Property Value
System.Windows.Forms.Padding

PageSize

Gets or sets the page size in millimeters for the exported file.

Declaration
public SizeF PageSize { get; set; }
Property Value
System.Drawing.SizeF

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 exported 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 exported near the upper right corner of the page.

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

RowsLayoutType

Gets the layout type of pivot grid row container.

Declaration
public PivotLayout RowsLayoutType { get; set; }
Property Value
PivotLayout

Scale

Gets or sets the document scaling. Default value is 1. For example, scale of 1.2f means 20% size increase.

Declaration
public double Scale { get; set; }
Property Value
System.Double

ShowHeaderAndFooter

Gets or sets a value indicating whether header and footer should be exported.

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

SubTotalsBackColor

Gets or sets the background color of subtotal cells.

Declaration
public Color SubTotalsBackColor { get; set; }
Property Value
System.Drawing.Color

Methods

ApplyLineBreaksToText(Object)

Declaration
protected virtual string[] ApplyLineBreaksToText(object value)
Parameters
System.Object value

Returns
System.String[]

CalculateHeaderFooterContentOffset(Double, SizeF, StringAlignment)

Declaration
protected virtual SizeF CalculateHeaderFooterContentOffset(double height, SizeF size, StringAlignment alignment)
Parameters
System.Double height

System.Drawing.SizeF size

System.Drawing.StringAlignment alignment

Returns
System.Drawing.SizeF

CancelExportAsync()

Cancels an asynchronous export operation.

Declaration
public void CancelExportAsync()

ConvertImageToByteArray(Image)

Declaration
protected virtual byte[] ConvertImageToByteArray(Image image)
Parameters
System.Drawing.Image image

Returns
System.Byte[]

DrawCell(GridPdfExportCellElement, String[], Double, Double, Double, Boolean)

Declaration
protected virtual double DrawCell(GridPdfExportCellElement cell, string[] value, double rowHeight, double cellWidth, double columnWidth, bool isNotCellFirstPage)
Parameters
GridPdfExportCellElement cell

System.String[] value

System.Double rowHeight

System.Double cellWidth

System.Double columnWidth

System.Boolean isNotCellFirstPage

Returns
System.Double

DrawCellBorders(GridPdfExportCellElement, Double, Double, Boolean)

Declaration
protected virtual double DrawCellBorders(GridPdfExportCellElement cell, double rowHeight, double width, bool isNotFirst)
Parameters
GridPdfExportCellElement cell

System.Double rowHeight

System.Double width

System.Boolean isNotFirst

Returns
System.Double

DrawCellFill(GridPdfExportCellElement, Double, Double)

Declaration
protected virtual void DrawCellFill(GridPdfExportCellElement cell, double rowHeight, double width)
Parameters
GridPdfExportCellElement cell

System.Double rowHeight

System.Double width

DrawFooter()

Exports the footer part of the page.

Declaration
protected virtual void DrawFooter()

DrawFourBorders(GridPdfExportCellElement, ref PointF, ref PointF, ref PointF, ref PointF, Boolean, Boolean)

Declaration
protected virtual void DrawFourBorders(GridPdfExportCellElement cell, ref PointF tLeft, ref PointF tRight, ref PointF bRight, ref PointF bLeft, bool drawLeftBorder, bool drawRightBorder)
Parameters
GridPdfExportCellElement cell

System.Drawing.PointF tLeft

System.Drawing.PointF tRight

System.Drawing.PointF bRight

System.Drawing.PointF bLeft

System.Boolean drawLeftBorder

System.Boolean drawRightBorder

DrawHeader()

Exports the header part of the page.

Declaration
protected virtual void DrawHeader()

DrawHeaderFooter(PageHeaderFooter)

Declaration
protected virtual void DrawHeaderFooter(PageHeaderFooter headerFooter)
Parameters
PageHeaderFooter headerFooter

DrawHeaderFooterImage(String, Double, StringAlignment)

Declaration
protected virtual void DrawHeaderFooterImage(string text, double height, StringAlignment alignment)
Parameters
System.String text

System.Double height

System.Drawing.StringAlignment alignment

DrawHeaderFooterText(String, Double, StringAlignment)

Declaration
protected virtual void DrawHeaderFooterText(string text, double height, StringAlignment alignment)
Parameters
System.String text

System.Double height

System.Drawing.StringAlignment alignment

DrawImage(GridPdfExportCellElement, Double, Double, Double, Boolean)

Declaration
protected virtual void DrawImage(GridPdfExportCellElement cell, double rowHeight, double cellWidth, double columnWidth, bool isNotFirst)
Parameters
GridPdfExportCellElement cell

System.Double rowHeight

System.Double cellWidth

System.Double columnWidth

System.Boolean isNotFirst

DrawOuterInnerBorders(GridPdfExportCellElement, ref PointF, ref PointF, ref PointF, ref PointF, Boolean, Boolean)

Declaration
protected virtual void DrawOuterInnerBorders(GridPdfExportCellElement cell, ref PointF tLeft, ref PointF tRight, ref PointF bRight, ref PointF bLeft, bool drawLeftBorder, bool drawRightBorder)
Parameters
GridPdfExportCellElement cell

System.Drawing.PointF tLeft

System.Drawing.PointF tRight

System.Drawing.PointF bRight

System.Drawing.PointF bLeft

System.Boolean drawLeftBorder

System.Boolean drawRightBorder

DrawRow(PivotGridExportRowElement)

Declaration
protected virtual void DrawRow(PivotGridExportRowElement rowElement)
Parameters
PivotGridExportRowElement rowElement

DrawSingleBorder(GridPdfExportCellElement, ref PointF, ref PointF, ref PointF, ref PointF, Boolean, Boolean)

Declaration
protected virtual void DrawSingleBorder(GridPdfExportCellElement cell, ref PointF tLeft, ref PointF tRight, ref PointF bRight, ref PointF bLeft, bool drawLeftBorder, bool drawRightBorder)
Parameters
GridPdfExportCellElement cell

System.Drawing.PointF tLeft

System.Drawing.PointF tRight

System.Drawing.PointF bRight

System.Drawing.PointF bLeft

System.Boolean drawLeftBorder

System.Boolean drawRightBorder

DrawText(GridPdfExportCellElement, String[], Double, Double, Double, Boolean)

Declaration
protected virtual void DrawText(GridPdfExportCellElement cell, string[] value, double rowHeight, double cellWidth, double columnWidth, bool isNotFirst)
Parameters
GridPdfExportCellElement cell

System.String[] value

System.Double rowHeight

System.Double cellWidth

System.Double columnWidth

System.Boolean isNotFirst

GetAggregateDescriptorCell(Int32)

Declaration
protected virtual PivotGridSpreadExportCellElement GetAggregateDescriptorCell(int aggregateIndex)
Parameters
System.Int32 aggregateIndex

Returns
PivotGridSpreadExportCellElement

GetColumnDescriptorCell(Int32)

Declaration
protected virtual PivotGridSpreadExportCellElement GetColumnDescriptorCell(int descriptorIndex)
Parameters
System.Int32 descriptorIndex

Returns
PivotGridSpreadExportCellElement

GetColumnHeaderCell(Int32, Int32)

Declaration
protected virtual PivotGridSpreadExportCellElement GetColumnHeaderCell(int rowIndex, int columnIndex)
Parameters
System.Int32 rowIndex

System.Int32 columnIndex

Returns
PivotGridSpreadExportCellElement

GetDataCell(Int32, Int32, PivotRowElement)

Declaration
protected virtual PivotGridSpreadExportCellElement GetDataCell(int rowIndex, int columnIndex, PivotRowElement visualRow)
Parameters
System.Int32 rowIndex

System.Int32 columnIndex

PivotRowElement visualRow

Returns
PivotGridSpreadExportCellElement

GetExportElementForCell(Int32, Int32, PivotRowElement)

Declaration
protected virtual PivotGridSpreadExportCellElement GetExportElementForCell(int rowIndex, int columnIndex, PivotRowElement visualRow)
Parameters
System.Int32 rowIndex

System.Int32 columnIndex

PivotRowElement visualRow

Returns
PivotGridSpreadExportCellElement

GetNumberOfPages()

Declaration
public int GetNumberOfPages()
Returns
System.Int32

GetRowDescriptorCell(Int32)

Declaration
protected virtual PivotGridSpreadExportCellElement GetRowDescriptorCell(int descriptorIndex)
Parameters
System.Int32 descriptorIndex

Returns
PivotGridSpreadExportCellElement

GetRowHeaderCell(Int32, Int32)

Declaration
protected virtual PivotGridSpreadExportCellElement GetRowHeaderCell(int rowIndex, int columnIndex)
Parameters
System.Int32 rowIndex

System.Int32 columnIndex

Returns
PivotGridSpreadExportCellElement

GetStylesFromVisualCell(PivotGridSpreadExportCellElement, LightVisualElement)

Declaration
protected virtual void GetStylesFromVisualCell(PivotGridSpreadExportCellElement gridVisualElement, LightVisualElement visualCell)
Parameters
PivotGridSpreadExportCellElement gridVisualElement

LightVisualElement visualCell

GetVisualElement(Int32, Int32)

Declaration
protected virtual LightVisualElement GetVisualElement(int rowIndex, int columnIndex)
Parameters
System.Int32 rowIndex

System.Int32 columnIndex

Returns
LightVisualElement

HasLogoInHeaderFooterString(String)

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

Returns
System.Boolean

Initialize()

Declaration
public virtual void Initialize()

OnAsyncExportCompleted(AsyncCompletedEventArgs)

Raises the AsyncExportCompleted event.

Declaration
protected virtual void OnAsyncExportCompleted(AsyncCompletedEventArgs e)
Parameters
System.ComponentModel.AsyncCompletedEventArgs e

The System.ComponentModel.AsyncCompletedEventArgs instance containing the event data.

OnAsyncExportProgressChanged(ProgressChangedEventArgs)

Raises the AsyncExportProgressChanged event.

Declaration
protected virtual void OnAsyncExportProgressChanged(ProgressChangedEventArgs e)
Parameters
System.ComponentModel.ProgressChangedEventArgs e

The System.ComponentModel.ProgressChangedEventArgs instance containing the event data.

OnCellFormatting(PivotGridPdfExportCellFormattingEventArgs)

Raises the CellFormatting event.

Declaration
protected virtual void OnCellFormatting(PivotGridPdfExportCellFormattingEventArgs e)
Parameters
PivotGridPdfExportCellFormattingEventArgs e

The PivotGridPdfExportCellFormattingEventArgs instance containing the event data.

OnCellPaint(ExportCellPaintEventArgs)

Raises the CellPaint event.

Declaration
protected virtual void OnCellPaint(ExportCellPaintEventArgs e)
Parameters
ExportCellPaintEventArgs e

The ExportCellPaintEventArgs instance containing the event data.

OnFooterExported(ExportEventArgs)

Raises the FooterExported event.

Declaration
protected virtual void OnFooterExported(ExportEventArgs e)
Parameters
ExportEventArgs e

The ExportEventArgs instance containing the event data.

OnHeaderExported(ExportEventArgs)

Raises the HeaderExported event.

Declaration
protected virtual void OnHeaderExported(ExportEventArgs e)
Parameters
ExportEventArgs e

The ExportEventArgs instance containing the event data.

OnPdfExported(EventArgs)

Raises the PDFExported event.

Declaration
protected virtual void OnPdfExported(EventArgs e)
Parameters
System.EventArgs e

The System.EventArgs instance containing the event data.

ParseHeaderFooterString(String)

Parses a given string for special words.

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

The string.

Returns
System.String

The parsed string.

ProcessRows()

Declaration
protected virtual void ProcessRows()

RunExport(Stream, IPdfExportRenderer)

Starts an export operation.

Declaration
public void RunExport(Stream exportStream, IPdfExportRenderer pdfExportRenderer)
Parameters
System.IO.Stream exportStream

The stream where data will be exported.

IPdfExportRenderer pdfExportRenderer

.

RunExport(String, IPdfExportRenderer)

Starts an export operation.

Declaration
public void RunExport(string fileName, IPdfExportRenderer pdfExportRenderer)
Parameters
System.String fileName

The file name where data will be exported.

IPdfExportRenderer pdfExportRenderer

.

RunExportAsync(Stream, IPdfExportRenderer)

Starts an export operation that runs in a background thread.

Declaration
public void RunExportAsync(Stream exportStream, IPdfExportRenderer exportRenderer)
Parameters
System.IO.Stream exportStream

The stream where data will be exported.

IPdfExportRenderer exportRenderer

Instance of IPdfExportRenderer class.

RunExportAsync(String, IPdfExportRenderer)

Starts an export operation that runs in a background thread.

Declaration
public void RunExportAsync(string fileName, IPdfExportRenderer exportRenderer)
Parameters
System.String fileName

The file name where data will be exported.

IPdfExportRenderer exportRenderer

Instance of IPdfExportRenderer class.

Events

AsyncExportCompleted

Occurs when an async export operation is completed.

Declaration
public event AsyncCompletedEventHandler AsyncExportCompleted
Event Type
System.ComponentModel.AsyncCompletedEventHandler

AsyncExportProgressChanged

Occurs when the progress of an async export operation changes.

Declaration
public event ProgressChangedEventHandler AsyncExportProgressChanged
Event Type
System.ComponentModel.ProgressChangedEventHandler

CellFormatting

Occurs for every cell that is being exported.

Declaration
public event PivotGridPdfExportCellFormattingEventHandler CellFormatting
Event Type
PivotGridPdfExportCellFormattingEventHandler

CellPaint

Occurs when a cell is drawn.

Declaration
public event ExportCellPaintEventHandler CellPaint
Event Type
ExportCellPaintEventHandler

FooterExported

Occurs when the footer is exported.

Declaration
public event ExportEventHandler FooterExported
Event Type
ExportEventHandler

HeaderExported

Occurs when the header is exported.

Declaration
public event ExportEventHandler HeaderExported
Event Type
ExportEventHandler

PdfExported

Occurs when the export process completes.

Declaration
public event EventHandler PdfExported
Event Type
System.EventHandler

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
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.