Class PivotGridPdfExport
Inheritance
Inherited Members
Namespace: Telerik.WinControls.Export
Assembly: Telerik.WinControls.PivotGrid.dll
Syntax
public class PivotGridPdfExport
Constructors
PivotGridPdfExport(RadPivotGrid)
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
|
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
FooterHeight
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
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
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
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 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
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)
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()
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)
DrawHeaderFooterImage(String, Double, StringAlignment)
DrawHeaderFooterText(String, Double, StringAlignment)
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)
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)
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)
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
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
|