> 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/android/viewer/direction.md).

# Change Vertical and Horizontal Scroll Direction in Android PDF Viewer

Scroll through PDF documents with ease using PDFViewCtrl by changing scrolling direction. Enable vertical scrolling for continuous reading or horizontal scrolling for a page-by-page view. See how it w

When scrolling through pages of a document in [`PDFViewCtrl`](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/PDFViewCtrl.html), the scrolling direction can be changed by [setting the page layout mode](/android/viewer/view-mode.md).

## Vertical scrolling

Vertical scrolling mode (also known as continuous mode) can be enabled by setting the page presentation mode to either [`SINGLE_CONT`](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/PDFViewCtrl.PagePresentationMode.html), [`FACING_CONT`](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/PDFViewCtrl.PagePresentationMode.html), or [`FACING_COVER_CONT`](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/PDFViewCtrl.PagePresentationMode.html).

Here's what setting the page presentation mode to vertical scrolling looks like:

![](https://226546913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0QItsdFBmuuL9ezHimHy%2Fuploads%2Fgit-blob-bb57a00c5e5b24f8cf8494dae5947a774fcaef8e%2F1f698d6dd0736191a127e5f361af1cf17f64f213-600x1200.gif?alt=media)

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

```java
// with PdfViewCtrlTabHostFragment2 
PdfViewCtrlSettingsManager.updateViewMode(
    activity, 
    PdfViewCtrlSettingsManager.KEY_PREF_VIEWMODE_CONTINUOUS_VALUE
); 

// with PDFViewCtrl 
pdfViewCtrl.setPagePresentationMode(
    PDFViewCtrl.PagePresentationMode.SINGLE_CONT
);
```

{% endcode %}
{% endtab %}

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

```kotlin
// with PdfViewCtrlTabHostFragment2 
PdfViewCtrlSettingsManager.updateViewMode(
    activity, 
    PdfViewCtrlSettingsManager.KEY_PREF_VIEWMODE_CONTINUOUS_VALUE
) 

// with PDFViewCtrl 
mPdfViewCtrl.pagePresentationMode = PDFViewCtrl.PagePresentationMode.SINGLE_CONT
```

{% endcode %}
{% endtab %}

{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
// Xamarin.Android
// with PdfViewCtrlTabHostFragment2
PdfViewCtrlSettingsManager.UpdateViewMode(activity, PdfViewCtrlSettingsManager.KeyPrefViewmodeContinuousValue);
// with PDFViewCtrl
pdfViewCtrl.PagePresentationMode = PDFViewCtrl.PagePresentationMode.SingleCont;
```

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

## Horizontal scrolling

Horizontal scrolling mode (also known as non-continuous mode) can be enabled by setting the page presentation mode to either [`SINGLE`](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/PDFViewCtrl.PagePresentationMode.html), [`FACING`](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/PDFViewCtrl.PagePresentationMode.html), or [`FACING_COVER`](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/PDFViewCtrl.PagePresentationMode.html).

Here's what setting the page presentation mode to horizontal scrolling looks like:

![](https://226546913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0QItsdFBmuuL9ezHimHy%2Fuploads%2Fgit-blob-8340082568d8ca69e6727347377b099f34e9e0a9%2F811227718b1a22af1fbdc27ae9f4ff5f9d33b11f-600x1200.gif?alt=media)

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

```java
// with PdfViewCtrlTabHostFragment2
PdfViewCtrlSettingsManager.updateViewMode(activity, PdfViewCtrlSettingsManager.KEY_PREF_VIEWMODE_CONTINUOUS_VALUE);

// with PDFViewCtrl
pdfViewCtrl.setPagePresentationMode(PDFViewCtrl.PagePresentationMode.SINGLE_CONT);
```

{% endcode %}
{% endtab %}

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

```kotlin
// with PdfViewCtrlTabHostFragment2
PdfViewCtrlSettingsManager.updateViewMode(activity, PdfViewCtrlSettingsManager.KEY_PREF_VIEWMODE_SINGLEPAGE_VALUE)

// with PDFViewCtrl
mPdfViewCtrl.pagePresentationMode = PDFViewCtrl.PagePresentationMode.SINGLE
```

{% endcode %}
{% endtab %}

{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
// Xamarin.Android
// with PdfViewCtrlTabHostFragment2
PdfViewCtrlSettingsManager.UpdateViewMode(activity, PdfViewCtrlSettingsManager.KeyPrefViewmodeSinglepageValue);
// with PDFViewCtrl
pdfViewCtrl.PagePresentationMode = PDFViewCtrl.PagePresentationMode.Single;
```

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


---

# 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/android/viewer/direction.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.
