Suppress the error dialog in Blazor SfPdfViewer Component
17 Jul 20261 minute to read
The Blazor SfPdfViewer component supports suppressing the built-in error dialog using the EnableErrorDialog property. The default value is true; set it to false to hide the dialog and handle errors through custom logic.
The following code example shows how to suppress the error dialog.
@using Syncfusion.Blazor.SfPdfViewer
<SfPdfViewer2 @ref="PdfViewer"
DocumentPath="@DocumentPath"
EnableErrorDialog="false"
Height="100%"
Width="100%">
</SfPdfViewer2>
@code{
private SfPdfViewer2 PdfViewer;
private string DocumentPath { get; set; } = "PDF_Succinctly.pdf";
}