Suppress the error dialog in Blazor SfPdfViewer Component

20 Jun 20231 minute to read

The Syncfusion’s Blazor SfPdfViewer component allows you to suppress or disable the error dialog box displayed in the SfPdfViewer using the EnableErrorDialog property. The default value of the property is true.

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{
    SfPdfViewer2 PdfViewer;
    private string DocumentPath { get; set; } = "PDF_Succinctly.pdf";
}

View sample in GitHub