---
title: "A page as an image, with rulers and the fields placed on it"
method: GET
path: "/api/v1/documents/{id}/pages/{pageNumber}/image"
tags: ["Documents"]
---

# A page as an image, with rulers and the fields placed on it

`GET /api/v1/documents/{id}/pages/{pageNumber}/image`

## Request

- Base URL: `https://api.korala.ai`
- URL: `https://api.korala.ai/api/v1/documents/{id}/pages/{pageNumber}/image`
- Auth: one of:
  - API key in header `X-API-Key`
  - `bearer` (a scheme the document does not define)

Renders one page of the uploaded PDF as a PNG. Rulers labelled in points from the top-left corner are drawn on it, which is the frame field positions use, so a caller that places fields by eye reads coordinates off the page instead of converting pixels. Fields already placed are outlined, so it can check its own work.

## Path parameters

- `id` string, required
- `pageNumber` number, required

## Query parameters

- `rulers` boolean
- `fields` boolean

## Response `200`

- PageImageDto
  - `pageNumber` number, required
  - `pageCount` number, required: Pages in the document
  - `widthPoints` number, required: Page width in PDF points
  - `heightPoints` number, required: Page height in PDF points
  - `pixelsPerPoint` number, required: Image pixels per PDF point. Divide a pixel position by this to get the point position a field takes.
  - `fieldsShown` number, required: Fields outlined on the image
  - `fields` PageImageFieldDto[], required: The outlined fields. Each is captioned on the image with its number and type; whose it is, is here
    - `number` number, required: The number captioned on the image
    - `fieldId` string, required
    - `fieldType` 'signature' | 'initials' | 'date' | 'text' | 'checkbox' | 'dropdown' | 'radio', required
    - `signerName` string, nullable, required
    - `xPosition` number, required
    - `yPosition` number, required
    - `width` number, required
    - `height` number, required
  - `pngBase64` string, required: The page as a PNG, base64-encoded

## Other responses

- `400`: Malformed UUID in path parameter (`id`, `pageNumber`).

---

[API](https://skmtc.dev/korala/apis/korala-public-api.md) · [All operations](https://skmtc.dev/korala/apis/korala-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/korala/apis/korala-public-api/revisions/5c4d7810c507?raw)
