Class RichTextEditorExportPdf
A class used for configuring the export pdf document in the SfRichTextEditor.
Inheritance
Namespace: Syncfusion.Blazor.RichTextEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class RichTextEditorExportPdf : OwningComponentBase
Constructors
RichTextEditorExportPdf()
Declaration
public RichTextEditorExportPdf()
Properties
FileName
Gets or sets the file name for the exported PDF document.
Declaration
public string FileName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the exported PDF file. The default value is |
Remarks
The specified file name will be assigned to the PDF document generated during the export process.
Ensure that a valid ServiceUrl
is configured to apply the specified file name correctly during the export process.
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
public string ServiceUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String | The URL of the service responsible for exporting Rich Text Editor content to a PDF file. The default value is |
Remarks
The service URL should point to a server endpoint capable of processing PDF export requests and returning 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
public string Stylesheet { get; set; }
Property Value
Type | Description |
---|---|
System.String | The stylesheet used when exporting Rich Text Editor content to a PDF file. The default value is |
Remarks
The stylesheet enables the application of custom CSS styles to the exported PDF file.
Ensure that a valid ServiceUrl
is configured to apply the specified stylesheet correctly 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(Boolean)
Dispose unmanaged resources in the Syncfusion Blazor component.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Boolean value to dispose the object. |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |