> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/xamarin/guides/advanced-customization/rtl-support.md).

# Supporting right-to-left (RTL) language documents in Xamarin

Enhance your document viewer with right-to-left (RTL) language support using the Apryse SDK. Learn how to enable RTL mode for a seamless reading experience. The Apryse Xamarin SDK streamlines secure,

To support right-to-left (RTL) language documents, the Apryse SDK provides a high-level API for changing the reading direction of documents in your document viewer.

![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-17c6de4c893c82e37736367178f68940218bed3c%2F7ad05b69228fc07c9a31b7ebd9c30b10dc991ede-1080x2220.gif?alt=media)

If you are using [DocumentActivity](/xamarin/guides/android/basics/open.md#activity) or [PdfViewCtrlTabHostFragment2](/xamarin/guides/android/basics/open.md#fragment), you can enable right-to-left (RTL) support in your document viewer by setting it with [ViewerConfig](/xamarin/viewer/viewer-config.md#android):

{% tabs %}
{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
//@data {"m":true}//
ViewerConfig.Builder builder = new ViewerConfig.Builder();
ViewerConfig config = builder
    .FullscreenModeEnabled(true)
    .MultiTabEnabled(true)
    .DocumentEditingEnabled(true)
    .LongPressQuickMenuEnabled(true)
    // ...
    .RightToLeftModeEnabled(true)   // Enable RTL mode, must also call showRightToLeftOption
    .ShowRightToLeftOption(true)    // Show RTL toggle button in view mode dialog
    .Build();
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
//@data {"m":true}//
val builder = ViewerConfig.Builder()
val config = builder
    .fullscreenModeEnabled(true)
    .multiTabEnabled(true)
    .documentEditingEnabled(true)
    .longPressQuickMenuEnabled(true)
    // ...
    .rightToLeftModeEnabled(true)   // Enable RTL mode, must also call showRightToLeftOption
    .showRightToLeftOption(true)    // Show RTL toggle button in view mode dialog
    .build()
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Note that if you call rightToLeftModeEnabled you must also call showRightToLeftOption in order for right-to-left (RTL) mode to be enabled.**
{% endhint %}

If you would like more granular control over your document viewer, you can enable right-to-left (RTL) directly in [PDFViewCtrl](/xamarin/guides/android/basics/open.md#view) by calling `PDFViewCtrl.setRightToLeftLanguage(true)`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.apryse.com/xamarin/guides/advanced-customization/rtl-support.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
