Use a RTL language

As we know, the Viewer component allows us to use a different language. The right-to-left (RTL) languages such as Arabic, Farsi, Hebrew, Pashto, Persian, Sindhi, Urdu, etc., require the user interface to be displayed in the same direction.
The main Viewer and other components provided by other plugins such as the default layout, toolbar plugins support RTL languages. All you need to do is to set the direction option as following:
import { TextDirection } from '@react-pdf-viewer/core';
<Viewer
theme={{
direction: TextDirection.RightToLeft,
}}
/>;
There are two possible values for the direction option:
Value    DescriptionFrom
TextDirection.LeftToRightLeft to right (LTR) direction. It's the default value2.8.0
TextDirection.RightToLeftRight to left (RTL) direction2.8.0
The following example demonstrates how to use the Arabic language with a RTL user interface:

See also