---
title: "Coordinate conversion in Flutter PDF viewer"
canonical_url: "https://www.nutrient.io/guides/flutter/viewer/coordinate-conversion/"
md_url: "https://www.nutrient.io/guides/flutter/viewer/coordinate-conversion.md"
last_updated: "2026-05-27T21:01:12.694Z"
description: "Convert between view coordinates and PDF page coordinates using Nutrient Flutter SDK. Map view-space and PDF-space coordinate systems on Android and iOS."
---

# Coordinate conversion in the Flutter PDF viewer

PDF documents use a coordinate space that differs from the view coordinate space used by Flutter. The PDF coordinate system has its origin in the bottom-left corner with y values increasing upward, while Flutter view coordinates have their origin in the top-left corner with y values increasing downward.

Nutrient Flutter SDK provides coordinate conversion APIs on [`NutrientViewController`](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter/NutrientViewController-class.html) for mapping between these two coordinate spaces on Android and iOS.

Coordinate conversion is supported on Android and iOS. It isn’t available on Web.

## Converting view coordinates to PDF coordinates

`convertViewPointToPdfPoint` converts a point from the view coordinate space to the PDF page coordinate space. The input point is in logical pixel coordinates relative to the upper-left corner of the rendered page:

```dart

NutrientViewController? controller;

NutrientView(
  documentPath: documentPath,
  onViewCreated: (NutrientViewController c) {
    controller = c;
  },
  onDocumentLoaded: (PdfDocument document) async {
    final pdfPoint = await controller?.convertViewPointToPdfPoint(
      0, // pageIndex (zero-based)
      const Offset(150.0, 300.0),
    );

    print('PDF coordinates: (${pdfPoint?.dx}, ${pdfPoint?.dy})');
  },
)

```

## Converting PDF coordinates to view coordinates

`convertPdfPointToViewPoint` converts a point from the PDF page coordinate space to the view coordinate space. The returned `Offset` is in logical pixel coordinates relative to the upper-left corner of the rendered page:

```dart

final viewPoint = await controller.convertPdfPointToViewPoint(
  0, // pageIndex (zero-based)
  const Offset(72.0, 720.0),
);

print('View coordinates: (${viewPoint.dx}, ${viewPoint.dy})');

```

For more information about PDF coordinate spaces, refer to the [web guide on coordinate spaces](https://www.nutrient.io/guides/web/pspdfkit-for-web/coordinate-spaces.md).
---

## Related pages

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

