alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class RichTextEditorExportPdf

    A class used for configuring the export PDF document settings in the SfRichTextEditor. This enables the export of editor content into a PDF document format through a configured service URL.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    RichTextEditorExportPdf
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.RichTextEditor
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class RichTextEditorExportPdf : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    RichTextEditorExportPdf()

    Declaration
    public RichTextEditorExportPdf()

    Properties

    FileName

    Gets or sets the file name for the exported PDF document.

    Declaration
    [Parameter]
    public string? FileName { get; set; }
    Property Value
    Type Description
    string

    A string representing the name of the exported PDF file. The default value is Sample.pdf.

    Remarks

    The specified file name will be used for the PDF document generated during the export process. Ensure that a valid ServiceUrl is configured to apply the specified file name properly during the export.

    Examples

    This example demonstrates how to configure the FileName:

    <SfRichTextEditor>
        <RichTextEditorExportPdf FileName="@exportPdfFileName"  ServiceURL="@exportPdfServiceUrl" />
    </SfRichTextEditor>
    @code {
        private string exportPdfServiceUrl = "Enter the service URL here";
        private string exportPdfFileName = "Result.pdf";
    }

    ServiceUrl

    Gets or sets the URL of the service used to export the Rich Text Editor content to PDF files.

    Declaration
    [Parameter]
    public string? ServiceUrl { get; set; }
    Property Value
    Type Description
    string

    A string specifying the URL of the service responsible for exporting Rich Text Editor content to a PDF file. The default value is String.Empty.

    Remarks

    The service URL should point to a server endpoint that can process PDF export requests and return the generated PDF file in response.

    Examples

    This example demonstrates how to configure the ServiceUrl:

    <SfRichTextEditor>
        <RichTextEditorExportPdf ServiceUrl="@exportPdfServiceUrl" />
    </SfRichTextEditor>
    @code {
        private string exportPdfServiceUrl = "Enter the service URL here";
    }

    Stylesheet

    Gets or sets the stylesheet to be applied to the exported PDF file.

    Declaration
    [Parameter]
    public string? Stylesheet { get; set; }
    Property Value
    Type Description
    string

    A string containing the stylesheet used when exporting Rich Text Editor content to a PDF file. The default value is String.Empty.

    Remarks

    The stylesheet allows application of custom CSS styles to the exported PDF file. Ensure that a valid ServiceUrl is configured to apply the specified stylesheet during the export process.

    Examples

    This example demonstrates how to configure the Stylesheet:

    <SfRichTextEditor>
        <RichTextEditorExportPdf Stylesheet="@exportPdfStylesheet"  ServiceURL="@exportPdfServiceUrl"/>
    </SfRichTextEditor>
    @code {
        private string exportPdfServiceUrl = "Enter the service URL here";
        private string exportPdfStylesheet = ".e-rte-content { font-size: 1em; font-weight: 400; margin: 0; }";
    }

    Methods

    Dispose(bool)

    Dispose unmanaged resources in the Syncfusion Blazor component.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Boolean value to dispose the object.

    Overrides
    OwningComponentBase.Dispose(bool)

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    Task
    Overrides
    ComponentBase.OnInitializedAsync()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved