Blazor

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfExportProperties

    Show / Hide Table of Contents

    Class PdfExportProperties

    Defines pdf export customization options.

    Inheritance
    System.Object
    PdfExportProperties
    TreeGridPdfExportProperties
    Namespace: Syncfusion.Blazor.Grids
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class PdfExportProperties : Object

    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 Description
    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 Description
    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 Description
    System.Collections.Generic.List<GridColumn>

    DataSource

    Defines the data source dynamically before exporting.

    Declaration
    public IEnumerable<object> DataSource { get; set; }
    Property Value
    Type Description
    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 Description
    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 Description
    Syncfusion.PdfExport.PdfGridEndCellLayoutEventHandler

    ExportType

    Indicates to export current page or all page.

    Declaration
    public ExportType ExportType { get; set; }
    Property Value
    Type Description
    ExportType

    FileName

    Defines the file name for the exported file.

    Declaration
    public string FileName { get; set; }
    Property Value
    Type Description
    System.String

    Footer

    Defines the Pdf footer.

    Declaration
    public PdfFooter Footer { get; set; }
    Property Value
    Type Description
    PdfFooter

    Header

    Defines the Pdf header.

    Declaration
    public PdfHeader Header { get; set; }
    Property Value
    Type Description
    PdfHeader

    HierarchyExportMode

    Defines the hierarchy export mode for the pdf grid.

    Declaration
    public HierarchyExportMode HierarchyExportMode { get; set; }
    Property Value
    Type Description
    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 Description
    System.Boolean

    IncludeHeaderRow

    Enable/disable the property to export the Grid column header row.

    Declaration
    public bool IncludeHeaderRow { get; set; }
    Property Value
    Type Description
    System.Boolean

    IncludeHiddenColumn

    Indicates whether to show the hidden columns in exported Pdf.

    Declaration
    public bool IncludeHiddenColumn { get; set; }
    Property Value
    Type Description
    System.Boolean

    IncludeTemplateColumn

    Indicates whether to show/hide the Template columns in exported excel.

    Declaration
    public bool IncludeTemplateColumn { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsRepeatHeader

    Enable/disbale the PDF header repeats every page.

    Declaration
    public bool IsRepeatHeader { get; set; }
    Property Value
    Type Description
    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 Description
    System.Boolean

    PageOrientation

    Defines the Pdf orientation.

    Declaration
    public PageOrientation PageOrientation { get; set; }
    Property Value
    Type Description
    PageOrientation

    PageSize

    Defines the Pdf page size.

    Declaration
    public PdfPageSize PageSize { get; set; }
    Property Value
    Type Description
    PdfPageSize

    Theme

    Defines the theme for exported data.

    Declaration
    public PdfTheme Theme { get; set; }
    Property Value
    Type Description
    PdfTheme
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved