> 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/basic-operations/basics/page-fit.md).

# Page fit & default zoom mode in Xamarin

Control default zoom levels of pages and documents with PDFViewCtrl's page view mode. Learn about different page view modes supported and how to set default page fit mode dynamically. Optimize your vi

[`PDFViewCtrl`](https://sdk.apryse.com/api/xamarinios/tools/api/pdftron.PDF.PDFViewCtrl.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 (Xamarin.Android / Xamarin.iOS)                                   | Description                                                            | Screenshot-portrait                                                                                                                                                                                                                              | Screenshot-landscape                                                                                                                                                                                                                             |
| -------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `PDFViewCtrl.PageViewModes.FitPage` / `pdftron.PDF.PageViewModes.e_fit_page`     | The zoom is set so that the entire page is visible without scrolling.  | ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-75dac026a54c93293e068ea0126e7b2254223347%2F3bc90440e459b1e155b0f9a9a7b9f754b42cd5a3-1226x2502.png?alt=media) | ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-59ee3c57818fc825dd337857ea392d65db11b26e%2F841cc04ecb1c2ef5520ce434ba27648c5bbaa084-2502x1226.png?alt=media) |
| `PDFViewCtrl.PageViewModes.FitWidth` / `pdftron.PDF.PageViewModes.e_fit_width`   | The zoom is set so that the page's width matches the viewer's width.   | ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-75dac026a54c93293e068ea0126e7b2254223347%2F3bc90440e459b1e155b0f9a9a7b9f754b42cd5a3-1226x2502.png?alt=media) | ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-74b859d92340e86d05d9af23069457d040ecbea5%2F42f381b7f550ab570da82f3afa419094122b4fd6-2502x1226.png?alt=media) |
| `PDFViewCtrl.PageViewModes.FitHeight` / `pdftron.PDF.PageViewModes.e_fit_height` | The zoom is set so that the page's height matches the viewer's height. | ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-79b17d5d72e78c79c78f49f46ce25c5551cfc569%2Fb5d49d5c12472369c3a26dacaeb96562b27c6b86-1226x2502.png?alt=media) | ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-59ee3c57818fc825dd337857ea392d65db11b26e%2F841cc04ecb1c2ef5520ce434ba27648c5bbaa084-2502x1226.png?alt=media) |
| `PDFViewCtrl.PageViewModes.Zoom` / `pdftron.PDF.PageViewModes.e_zoom`            | The viewer's zoom is not adjusted based on the page.                   | ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-572196d94e5fa9ef10e4f80437b30d02f03c79b8%2Ff75a6a20b2eff23f7081d162d834b79adc01cf57-1226x2502.png?alt=media) | ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%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 `PageRefViewMode` property.

## Set the page fit mode dynamically

If you want to dynamically change the page fit mode, use `PageViewMode` property. Note that when the user flips the page, the page view mode will be automatically reset to the default mode set by `PageRefViewMode`.

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

```csharp
// Xamarin.Android
mPdfViewCtrl.PageViewMode = pdftron.PDF.PDFViewCtrl.PageViewModes.FitPage;

// Xamarin.iOS
mPdfViewCtrl.PageViewMode = pdftron.PDF.PageViewModes.FitPage;
```

{% 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/xamarin/basic-operations/basics/page-fit.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.
