> 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/ios/viewer/view-mode.md).

# View mode

Discover how to optimize your iOS PDFViewCtrl with different page layout and fit modes. Learn how to adjust presentation modes for the best viewing experience. Click to find out more! The Apryse iOS S

There are a few view modes which can be adjusted to provide an optimal presentation such as layout, fit, or reflow.

{% tabs %}
{% tab title="Layout" %}

## Page layout/presentation mode on iOS

[`PDFViewCtrl`](https://sdk.apryse.com/api/ios/Classes/PTPDFViewCtrl.html) supports a number of page layouts ([presentation modes](https://sdk.apryse.com/api/ios/Enums/TrnPagePresentationMode.html)), as listed below:

| Page presentation mode                                                                               | Description                                                                                             |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [`e_trn_single_page`](https://sdk.apryse.com/api/ios/Enums/TrnPagePresentationMode.html)             | Displays one page at a time, swiping left and right to change pages.                                    |
| [`e_trn_single_continuous`](https://sdk.apryse.com/api/ios/Enums/TrnPagePresentationMode.html)       | Displays one page at a time, scrolling up and down to change pages.                                     |
|                                                                                                      |                                                                                                         |
| [`e_trn_facing`](https://sdk.apryse.com/api/ios/Enums/TrnPagePresentationMode.html)                  | Displays two pages at a time, with odd-numbered pages on left, swiping left and right to change pages.  |
| [`e_trn_facing_continuous`](https://sdk.apryse.com/api/ios/Enums/TrnPagePresentationMode.html)       | Displays pages in two columns, with odd-numbered pages on left, scrolling up and down to change pages.  |
|                                                                                                      |                                                                                                         |
| [`e_trn_facing_cover`](https://sdk.apryse.com/api/ios/Enums/TrnPagePresentationMode.html)            | Displays two pages at a time, with odd-numbered pages on right, swiping left and right to change pages. |
| [`e_trn_facing_continuous_cover`](https://sdk.apryse.com/api/ios/Enums/TrnPagePresentationMode.html) | Display pages in two columns, with odd-numbered pages on right, scrolling up and down to change pages.  |
|                                                                                                      |                                                                                                         |

## Set the page presentation mode

You can set page presentation mode in your `PDFViewCtrl` by using [`setPagePresentationMode(_:)`](https://sdk.apryse.com/api/ios/Classes/PTPDFViewCtrl.html#/c:objc\(cs\)PTPDFViewCtrl\(im\)SetPagePresentationMode:):

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

```swift
self.pdfViewCtrl.setPagePresentationMode(e_trn_facing);
```

{% endcode %}
{% endtab %}

{% tab title="Obj-C" %}
{% code lineNumbers="true" %}

```objc
[self.pdfViewCtrl SetPagePresentationMode:e_trn_facing];
```

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

{% tab title="Fit" %}

## Page fit & default zoom mode on iOS

[`PDFViewCtrl`](https://sdk.apryse.com/api/ios/Classes/PTPDFViewCtrl.html)'s page view mode controls the default zoom level of pages and documents. New documents will automatically open at the zoom level specified by the mode.

## Page view modes

`PDFViewCtrl` supports the following page view modes:

| Page view mode                                                                  | Description                                                            | Screenshot-portrait                                                                                                                                                                                                                               | Screenshot-landscape                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`e_trn_fit_page`](https://sdk.apryse.com/api/ios/Enums/TrnPageViewMode.html)   | The zoom is set so that the entire page is visible without scrolling.  | ![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-75dac026a54c93293e068ea0126e7b2254223347%2F3bc90440e459b1e155b0f9a9a7b9f754b42cd5a3-1226x2502.png?alt=media) | ![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-59ee3c57818fc825dd337857ea392d65db11b26e%2F841cc04ecb1c2ef5520ce434ba27648c5bbaa084-2502x1226.png?alt=media) |
| [`e_trn_fit_width`](https://sdk.apryse.com/api/ios/Enums/TrnPageViewMode.html)  | The zoom is set so that the page's width matches the viewer's width.   | ![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-75dac026a54c93293e068ea0126e7b2254223347%2F3bc90440e459b1e155b0f9a9a7b9f754b42cd5a3-1226x2502.png?alt=media) | ![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-74b859d92340e86d05d9af23069457d040ecbea5%2F42f381b7f550ab570da82f3afa419094122b4fd6-2502x1226.png?alt=media) |
| [`e_trn_fit_height`](https://sdk.apryse.com/api/ios/Enums/TrnPageViewMode.html) | The zoom is set so that the page's height matches the viewer's height. | ![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-79b17d5d72e78c79c78f49f46ce25c5551cfc569%2Fb5d49d5c12472369c3a26dacaeb96562b27c6b86-1226x2502.png?alt=media) | ![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-59ee3c57818fc825dd337857ea392d65db11b26e%2F841cc04ecb1c2ef5520ce434ba27648c5bbaa084-2502x1226.png?alt=media) |
| [`e_trn_zoom`](https://sdk.apryse.com/api/ios/Enums/TrnPageViewMode.html)       | The viewer's zoom is not adjusted based on the page.                   | ![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-572196d94e5fa9ef10e4f80437b30d02f03c79b8%2Ff75a6a20b2eff23f7081d162d834b79adc01cf57-1226x2502.png?alt=media) | ![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-0919e301109558a25e8cd471fdaaa13fafef21aa%2F0ac86387d778f0aa34b4652898261bdfa4813f8a-2502x1226.png?alt=media) |

## Set the default page fit mode

You can set a default page fit mode in your `PDFViewCtrl` by using [`SetPageRefViewMode:`](https://sdk.apryse.com/api/ios/Classes/PTPDFViewCtrl.html#/c:objc\(cs\)PTPDFViewCtrl\(im\)SetPageRefViewMode:).

## Set the page fit mode dynamically

If you want to dynamically change the page fit mode, use [`SetPageViewMode:`](https://sdk.apryse.com/api/ios/Classes/PTPDFViewCtrl.html#/c:objc\(cs\)PTPDFViewCtrl\(im\)SetPageViewMode:). Note that when the user flips the page, the page view mode will be automatically reset to the default mode set by `setPageRefViewMode`.

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

```swift
self.pdfViewCtrl.setPageViewMode(e_trn_fit_width);
```

{% endcode %}
{% endtab %}

{% tab title="Obj-C" %}
{% code lineNumbers="true" %}

```objc
[self.pdfViewCtrl SetPageViewMode:e_trn_fit_width];
```

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

{% tab title="Reflow" %}

## Reflow document mode on iOS

Reflow makes the document more flexible and easier to read, especially on small devices. Apryse is able to extract the reflowable layout of each page of a PDF document as an HTML file. In this guide, we explain how simple it is to show a widget that allows the user to swipe left or right through the pages of the document to see reflowable document pages.

The [`PTReflowViewController`](https://sdk.apryse.com/api/ios/Classes/PTReflowViewController.html) class allows the user to flip left and right through the reflowable layout of pages in a certain PDF document.

![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-f106f933af484a4c140bcdf32491ae9b76921a50%2F858672a1b898f759f5072510e7d0fad1e9e3faf6-600x1068.gif?alt=media)

*The reflow control is part of the Tools library, so make sure you have* [*added the Tools library to your project*](/ios/ui-customization/setup.md)*.*

## Show a reflow view controller

To create a new reflow view controller instance and display it from another view controller, supply a `PTPDFViewCtrl` instance to the `PTReflowViewController` designated initializer:

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

```swift
// Initialize reflow view controller with a PTPDFViewCtrl instance.
let reflowViewController = PTReflowViewController(pdfViewCtrl: pdfViewCtrl)

// Set the current view controller as the reflow view controller's delegate.
reflowViewController.delegate = self

let navigationController = UINavigationController(rootViewController: reflowViewController)
self.present(navigationController, animated: true, completion: nil)
```

{% endcode %}
{% endtab %}

{% tab title="Obj-C" %}
{% code lineNumbers="true" %}

```objc
// Initialize reflow view controller with a PDFViewCtrl instance.
PTReflowViewController *reflowViewController = [[PTReflowViewController alloc] initWithPDFViewCtrl:pdfViewCtrl];

// Set the current view controller as the reflow view controller's delegate.
reflowViewController.delegate = self;

UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:reflowViewController];
[self presentViewController:navigationController animated:YES completion:nil];
```

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

That is everything you need to have a simple reflow control. Next, we will go through advanced features.

## Customization

It is possible to change the scale of text in the reflow view controller. The default text scale is 1.0 and can be changed with the [`scale`](https://sdk.apryse.com/api/ios/Classes/PTReflowViewController.html#/c:objc\(cs\)PTReflowViewController\(py\)scale) property.

Similar to the [PDFViewCtrl ](/ios/basic-operations/open/view.md), tapping on the left or right edge of the reflow view controller can change the page. This behavior is disabled by default and can be enabled with the [`turnPageOnTap`](https://sdk.apryse.com/api/ios/Classes/PTReflowViewController.html#/c:objc\(cs\)PTReflowViewController\(py\)turnPageOnTap) property.
{% 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/ios/viewer/view-mode.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.
