> 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/viewer/rtl-support.md).

# Right to Left Scrolling support

Enable right-to-left (RTL) support in Xamarin.Android for your document viewer with Apryse SDK. Learn how to change scrolling direction and reading direction of documents effortlessly. The Apryse Xama

You can choose to change the scrolling direction to Right-to-Left if you require so for your document or language.

## Right-to-left support (RTL) in Xamarin.Android

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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/xamarin/viewer/rtl-support.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
