---
title: "Get Preview"
method: POST
path: "/api/pdf/preview"
tags: ["PDF Form Processing"]
---

# Get Preview

`POST /api/pdf/preview`

## Request

- Base URL: `https://api.qomplement.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.qomplement.com/api/pdf/preview`
- Auth: none declared

Generate a preview image of a PDF page.

Args:
    request: Contains base64-encoded PDF and page number

Returns:
    PreviewResponse with base64-encoded PNG image

## Request body

- PreviewRequest: Request model for PDF preview
  - `pdf_content` string, required
  - `page` integer

## Response `200`

Successful Response

- PreviewResponse: Response model for PDF preview
  - `success` boolean, required
  - `image` string, required
  - `width` integer, required
  - `height` integer, required
  - `page_count` integer, required
  - `error` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/qomplement/apis/qomplement-api.md) - [All operations](https://skmtc.dev/qomplement/apis/qomplement-api/llms.txt) - [OpenAPI document](https://skmtc.dev/qomplement/apis/qomplement-api/revisions/6fe617c112ef?raw)
