---
title: "Preview the first page of the project Gantt PDF"
method: GET
path: "/reports/project/{id}/gantt-preview.png"
tags: ["reports"]
---

# Preview the first page of the project Gantt PDF

`GET /reports/project/{id}/gantt-preview.png`

## Request

- Base URL: `https://api.onplana.com/api`
- URL: `https://api.onplana.com/api/reports/project/{id}/gantt-preview.png`
- Auth: one of:
  - HTTP bearer
  - API key in header `Authorization`

The export dialog's preview: the same PDF gantt.pdf would send for the same query (same options, refusals and renderer), with its first page rasterized at low resolution. Inline and not cached. X-Gantt-Pdf-Pages carries the page count of the full PDF. Its own rate limit of 240 previews per user per hour, apart from the exports. Answers 501 PREVIEW_UNAVAILABLE on a deployment without the rasterizer.

## Path parameters

- `id` string, required

## Query parameters

- `token` string, required
- `pageSize` string
- `orientation` string
- `margins` string
- `scale` string
- `fit` string
- `table` string
- `from` string
- `to` string
- `baselineId` string
- `showCriticalPath` string
- `showDependencies` string
- `showBaseline` string
- `hideCompleted` string

## Headers

- `X-Organization-Id` string, required

## Response `200`

PNG of page 1; X-Gantt-Pdf-Pages carries the full page count

## Other responses

- `400`: Invalid export options
- `404`: Project or baseline not found, or project not visible to the caller
- `422`: Too many tasks, or the layout would exceed 600 pages
- `429`: Rate limited
- `501`: The rasterizer is not available on this deployment

---

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