Class PdfHeaderFooterContent
Defines pdf header footer options.
Inherited Members
Namespace: Syncfusion.Blazor.Grids
Assembly: Syncfusion.Blazor.dll
Syntax
public class PdfHeaderFooterContent : PdfHeaderFooterElement
Constructors
PdfHeaderFooterContent()
Declaration
public PdfHeaderFooterContent()
Properties
Font
Defines the font for the content. Value can be either PdfStandardFont or TrueTypeFont.
Declaration
public object Font { get; set; }
Property Value
Type |
---|
System.Object |
Format
Defines the format for customizing page number.
Declaration
public string Format { get; set; }
Property Value
Type |
---|
System.String |
IsTrueType
Defines the trueTypeFont is enabled or not for font content.
Declaration
public bool IsTrueType { get; set; }
Property Value
Type |
---|
System.Boolean |
PageNumberType
Defines the page number type.
Declaration
public PdfPageNumberType PageNumberType { get; set; }
Property Value
Type |
---|
PdfPageNumberType |
Src
Defines the base64 string for image content type.
Declaration
public string Src { get; set; }
Property Value
Type |
---|
System.String |
Style
Defines the style of content.
Declaration
public PdfContentStyle Style { get; set; }
Property Value
Type |
---|
PdfContentStyle |
TextDirection
Gets or sets the tion of the PDF header and footer content. It allows changing the text direction.
Declaration
public PdfTextDirection TextDirection { get; set; }
Property Value
Type | Description |
---|---|
Syncfusion.PdfExport.PdfTextDirection | One of the values in the Syncfusion.PdfExport.PdfTextDirection enumeration that specifies the text direction. The default value is Syncfusion.PdfExport.PdfTextDirection.None. |
Remarks
The PdfTextDirection
property can be set to one of the following values:
- None: Content is displayed without any shaping or formatting based on languages. For example, the content
Welcome to سينكفيوجن products
will be rendered asWelcome to نجويفكنيس products
- LeftToRight: Content is shaping based on language and the reading order of content is from left to right. For example, the content
Welcome to سينكفيوجن products
will be rendered asWelcome to سينكفيوجن products
- RightToLeft: Content is shaping based on language and the reading order of content is from right to left. For example, the content
Welcome to سينكفيوجن products
will be rendered asproducts سينكفيوجن Welcome to
Examples
<SfGrid DataSource="@Orders" Toolbar="@(new List<string>() { "PdfExport" })" AllowPdfExport="true">
<GridEvents OnToolbarClick="ToolbarClickHandler" TValue="Order"></GridEvents>
</SfGrid>
@code{
SfGrid<BusinessObject> Grid;
public List<PdfHeaderFooterContent> HeaderContent = new List<PdfHeaderFooterContent>
{
new PdfHeaderFooterContent() { TextDirection = Syncfusion.PdfExport.PdfTextDirection.RightToLeft, Type = ContentType.Text, Value = "Welcome to سينكفيوجن products", Position = new PdfPosition() { X = 300, Y = 50 }},
}
public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
{
if (args.Item.Text == "PDF Export")
{
PdfExportProperties ExportProperties = new PdfExportProperties();
PdfHeader Header = new PdfHeader()
{
Contents = HeaderContent,
};
ExportProperties.Header = Header;
await this.Grid.PdfExport(ExportProperties);
}
}