---
title: "Flutter PDF viewer with the zoom API | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/flutter/viewer/zooming/"
md_url: "https://www.nutrient.io/guides/flutter/viewer/zooming.md"
last_updated: "2026-06-02T22:02:09.501Z"
description: "Flutter PDF viewer with the zoom | Nutrient SDK API documentation for Nutrient Flutter SDK with methods, properties, and code examples."
---

# Customizing zoom options in our Flutter PDF viewer

This guide demonstrates how to programmatically manage the zoom scale of a PDF page.

## Manual zooming

[`NutrientViewController`](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter/PspdfkitWidgetController-class.html) allows you to programmatically zoom to a specific scale or to an area of a PDF document page using the convenient zooming API, [`zoomToRect(int, Rect)`](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter/PspdfkitWidgetController/zoomToRect.html).

The `Rect` is in PDF page coordinates. For more information, refer to the web guide on [coordinate space conversion](https://www.nutrient.io/guides/web/pspdfkit-for-web/coordinate-spaces.md).

You can also retrieve the current zoom level of a page by calling [`NutrientViewController#getZoomScale`](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter/PspdfkitWidgetController/getZoomScale.html). Note that this feature is currently not supported on iOS.

## Zooming in to the page

To programmatically zoom in to the current page, use the [`zoomToRect`](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter/PspdfkitWidgetController/zoomToRect.html) method, which allows you to zoom to a specific scale. If you want to apply a scale factor to the current scale (e.g. increase the page scale by `2`), you can use `PdfConfiguration#defaultZoomScale`. Additionally, you can use [`zoomToRect(pageIndex, Rect)`](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter/PspdfkitWidgetController/zoomToRect.html) to zoom in to a specific `Rect` on any page (e.g. zoom in to a sentence or annotation):

```dart

// Zoom to the annotation.
var boundingBox = annotationJson['boundingBox'];
var lastRect = Rect.fromLTWH(boundingBox['left'], boundingBox['top'],
boundingBox['width'], boundingBox['height']);
_controller?.zoomToRect(18, lastRect)

```

[`zoomToRect(int, Rect)`](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter/PspdfkitWidgetController/zoomToRect.html) will automatically navigate to the given page if another page is currently being viewed. There’s no need to manually switch the page.

For more information on zooming, explore the `ZoomExample` inside our Catalog app.

## Starting the document at a given scale

You can start a document at a predetermined scale on a specific page. Note that on Android, rotating the screen will reset the scale. The `defaultZoomScale` property in [`PdfConfiguration`](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter/PdfConfiguration-class.html) controls this behavior:

```dart

PdfConfiguration configuration = PdfConfiguration(
    defaultZoomScale: 3.0f
);

```

## Disabling zooming

To disable zooming, set the `maximumZoomScale` of [`PdfConfiguration`](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter/PdfConfiguration-class.html) to `1`. It’s important to set this value before creating the view:

```dart

val configuration = PdfConfiguration(
    maximumZoomScale: 1.0f
);

```
---

## Related pages

- [Flutter image viewer library](/guides/flutter/viewer/images.md)
- [Flutter PDF viewer library](/guides/flutter/viewer.md)
- [Coordinate conversion in the Flutter PDF viewer](/guides/flutter/viewer/coordinate-conversion.md)
- [Customizing page navigation in our Flutter PDF viewer](/guides/flutter/viewer/page-navigation.md)
- [Get page information in Nutrient Flutter SDK PDF viewer](/guides/flutter/viewer/page-info.md)
- [Configuring scroll direction and page transitions in our Flutter viewer](/guides/flutter/viewer/page-transition.md)
- [Optimize PDF reading with reader view for iOS](/guides/flutter/viewer/reader-view.md)
- [Nutrient Flutter SDK web PDF viewer](/guides/flutter/viewer/web.md)

