---
title: "Flutter PDF viewer 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-07-31T00:00:00.000Z"
description: "Control PDF page zoom in Nutrient Flutter SDK with zoom methods, configuration options, and code examples."
---

# Customize zoom options in the Flutter PDF viewer

Use the zoom API to control the zoom scale of a PDF page programmatically.

## Zoom manually

Get `NutrientController` from the `onControllerReady` callback of `NutrientDocumentView`. Then use `zoomToRect(pageIndex, rect)` to zoom to an area of a page, and use `getZoomScale(pageIndex)` to read the current zoom level. Both methods support Android, iOS, and web. Refer to the [Nutrient controller](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter.bindings/NutrientController-class.html), [zoom to rect](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter.bindings/NutrientControllerInterface/zoomToRect.html), and [get zoom scale](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter.bindings/NutrientControllerInterface/getZoomScale.html) API references for details.

The `Rect` uses PDF page coordinates. Refer to the [coordinate conversion](https://www.nutrient.io/guides/flutter/viewer/coordinate-conversion.md) guide for details.

## Zoom in to a page area

Use `zoomToRect(pageIndex, Rect)` to zoom in to a specific `Rect` on any page. For example, you can zoom to an annotation’s bounding box:

```dart

NutrientDocumentView(
  documentPath: documentPath,
  onControllerReady: (controller) async {
    final rect = Rect.fromLTWH(60.0, 700.0, 200.0, 80.0);
    await controller.zoomToRect(0, rect);
  },
)

```

`zoomToRect` navigates to the given page if the viewer currently shows another page. You don’t need to switch pages manually.

Use `getZoomScale` to read the current zoom level of a page:

```dart

final scale = await controller.getZoomScale(0);

```

For more information about zooming, open `zoom_to_rect_example` in the Catalog app.

## Disable zooming

To disable zooming, set `maximumZoomScale` to `1.0` on `NutrientViewConfiguration` before you create the view. Refer to the [Nutrient view configuration](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter.bindings/NutrientViewConfiguration-class.html) API reference for details.

```dart

NutrientDocumentView(
  documentPath: documentPath,
  configuration: const NutrientViewConfiguration(
    maximumZoomScale: 1.0,
  ),
)

```

The legacy `PdfConfiguration.defaultZoomScale` option, which starts a document at a given scale, is part of the deprecated method-channel API and isn’t available on `NutrientViewConfiguration`.
---

## Related pages

- [Flutter PDF viewer library](/guides/flutter/viewer.md)
- [Coordinate conversion in the Flutter PDF viewer](/guides/flutter/viewer/coordinate-conversion.md)
- [Flutter image viewer library](/guides/flutter/viewer/images.md)
- [Get page information in the Nutrient Flutter SDK PDF viewer](/guides/flutter/viewer/page-info.md)
- [Customize page navigation in the Flutter PDF viewer](/guides/flutter/viewer/page-navigation.md)
- [Configure scroll direction and page transitions in the Flutter viewer](/guides/flutter/viewer/page-transition.md)
- [Use Reader View for iOS](/guides/flutter/viewer/reader-view.md)
- [Nutrient Flutter SDK web PDF viewer](/guides/flutter/viewer/web.md)

