NOTE

Syncfusion recommends using Blazor PDF Viewer (NextGen) Component which provides fast rendering of pages and improved performance. Also, there is no need of external Web service for processing the files and ease out the deployment complexity. It can be used in Blazor Server, WASM and MAUI applications without any changes.

Globalization and RTL in Blazor PDF Viewer Component

5 Sep 20231 minute to read

Localization

Blazor PDFViewer component can be localized. Refer to Blazor Localization topic to localize Syncfusion Blazor components.

Right to Left

Also, this component provides support to render the user interface suitable for users who use right-to-left (RTL) languages (Arabic, Hebrew, Azerbaijani, Persian, Urdu). You can specify the control to render in RTL by setting the EnableRtl property to true.

The following code snippet shows how to localize the component for Arabic language by setting the Locale and EnableRtl properties and providing the localized text.

@using Syncfusion.Blazor
@using Syncfusion.Blazor.PdfViewerServer


<SfPdfViewerServer Width="1060px" Height="500px" DocumentPath="@DocumentPath" EnableRtl="true" Locale="ar-AE" />

@code{
    public string DocumentPath { get; set; } = "wwwroot/data/PDF_Succinctly.pdf";
    [Inject]
    protected IJSRuntime JsRuntime { get; set; }
    protected override void OnAfterRender(bool firstRender)
    {
        this.JsRuntime.Sf().LoadLocaleData("wwwroot/locale.json");
    }
}

NOTE

You can refer to the Blazor PDF Viewer feature tour page for its groundbreaking feature representations. You can also explore the Blazor PDF Viewer example to understand how to explain core features of PDF Viewer.