Class PdfExportProperties
Defines pdf export customization options.
Inherited Members
Namespace: Syncfusion.Blazor.Grids
Assembly: Syncfusion.Blazor.dll
Syntax
public class PdfExportProperties : PdfExportPropertiesBase
Constructors
PdfExportProperties()
Declaration
public PdfExportProperties()
Properties
AllowHorizontalOverflow
Defines the overflow of columns for the pdf grid.
Declaration
public bool AllowHorizontalOverflow { get; set; }
Property Value
Type |
---|
System.Boolean |
BeginCellLayout
Gets or sets the value which is going to apply/customize the PDF Grid cell graphics. This event is raised when laying out a cell on a page.
<SfGrid DataSource="@Orders" @ref="DefaultGrid" Toolbar="@(new List<string>() { "PdfExport" })" AllowPdfExport="true" >
<GridEvents OnToolbarClick="ToolbarClickHandler" TValue="Order"></GridEvents>
........
</SfGrid>
@code{
public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
{
if (args.Item.Id == "Grid_pdfexport") //Id is combination of Grid's ID and itemname
{
PdfExportProperties ExportProperties = new PdfExportProperties();
ExportProperties.BeginCellLayout = new PdfGridBeginCellLayoutEventHandler(BeginCellEvent);
await this.DefaultGrid.PdfExport(ExportProperties);
}
}
private void BeginCellEvent(object sender, PdfGridBeginCellLayoutEventArgs args)
{
........
}
Declaration
public PdfGridBeginCellLayoutEventHandler BeginCellLayout { get; set; }
Property Value
Type |
---|
Syncfusion.PdfExport.PdfGridBeginCellLayoutEventHandler |
Columns
Defines the columns which are to be customized for Export alone.
Declaration
public List<GridColumn> Columns { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<GridColumn> |
DataSource
Defines the data source dynamically before exporting.
Declaration
public IEnumerable<object> DataSource { get; set; }
Property Value
Type |
---|
System.Collections.Generic.IEnumerable<System.Object> |
DisableAutoFitWidth
Defines the Grid's Column width to Pdf Column width. This can be also enables AllowHorizontalOverflow API internally.
Declaration
public bool DisableAutoFitWidth { get; set; }
Property Value
Type |
---|
System.Boolean |
EndCellLayout
Gets or sets the value which is going to apply/customize the PDF Grid cell graphics. This event is raised when you have finished laying out a page.
<SfGrid DataSource="@Orders" @ref="DefaultGrid" Toolbar="@(new List<string>() { "PdfExport" })" AllowPdfExport="true" >
<GridEvents OnToolbarClick="ToolbarClickHandler" TValue="Order"></GridEvents>
........
</SfGrid>
@code{
public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
{
if (args.Item.Id == "Grid_pdfexport") //Id is combination of Grid's ID and itemname
{
PdfExportProperties ExportProperties = new PdfExportProperties();
ExportProperties.EndCellLayout = new PdfGridEndCellLayoutEventHandler(EndCellEvent);
await this.DefaultGrid.PdfExport(ExportProperties);
}
}
private void EndCellEvent(object sender, PdfGridEndCellLayoutEventArgs args)
{
........
}
Declaration
public PdfGridEndCellLayoutEventHandler EndCellLayout { get; set; }
Property Value
Type |
---|
Syncfusion.PdfExport.PdfGridEndCellLayoutEventHandler |
ExportType
Indicates to export current page or all page.
Declaration
public ExportType ExportType { get; set; }
Property Value
Type |
---|
ExportType |
HierarchyExportMode
Defines the hierarchy export mode for the pdf grid.
Declaration
public HierarchyExportMode HierarchyExportMode { get; set; }
Property Value
Type |
---|
Syncfusion.Blazor.Grids.HierarchyExportMode |
IncludeCommandColumn
Indicates whether to show/hide the command columns in exported excel.
Declaration
public bool IncludeCommandColumn { get; set; }
Property Value
Type |
---|
System.Boolean |
IncludeHeaderRow
Enable/disable the property to export the Grid column header row.
Declaration
public bool IncludeHeaderRow { get; set; }
Property Value
Type |
---|
System.Boolean |
IsRepeatHeader
Enable/disable the PDF header repeats every page.
Declaration
public bool IsRepeatHeader { get; set; }
Property Value
Type |
---|
System.Boolean |
IsThemeEnabled
Enable/Disable the PDF style. If increasing the performance while using large records then disable this property.
Declaration
public bool IsThemeEnabled { get; set; }
Property Value
Type |
---|
System.Boolean |
PdfDetailRowMode
Gets or sets the mode for exporting detail rows to the PDF file format.
Declaration
public PdfDetailRowMode PdfDetailRowMode { get; set; }
Property Value
Type |
---|
PdfDetailRowMode |
Remarks
This property determines how detail rows are exported in PDF format:
- When set to "Expand", detail rows are exported in their expanded state.
- When set to "None", only parent rows are exported.
The default mode is
Expand
.
Theme
Defines the theme for exported data.
Declaration
public PdfTheme Theme { get; set; }
Property Value
Type |
---|
PdfTheme |