---
title: "Preview document thumbnails server-side | Nutrient"
canonical_url: "https://www.nutrient.io/guides/document-engine/pdf-generation/thumbnail-preview/"
md_url: "https://www.nutrient.io/guides/document-engine/pdf-generation/thumbnail-preview.md"
last_updated: "2026-05-14T21:57:26.840Z"
description: "Learn how to preview document thumbnails using Document Engine’s API by specifying page indices and dimensions for custom thumbnail images."
---

# Preview document thumbnails

You can preview the thumbnail image of any [document uploaded to Document Engine](https://www.nutrient.io/guides/document-engine/file-management/store-user-uploaded-files.md) by sending the request specifying the page index you want to preview and either the width or height of the thumbnail in the URL parameters.

```bash

curl "http://localhost:5000/api/documents/7KPS35QPZA65Z0DKSDJBTD5DFS/pages/0/image?width=100" \
  -H Authorization: Token token=secret" \
  -o thumbnail.png

```

After you run the above command, the `thumbnail.png` file will contain the rendered thumbnail.

To get a thumbnail of a specific height instead of width, replace the `width` parameter with `height`.

```bash

curl "http://localhost:5000/api/documents/7KPS35QPZA65Z0DKSDJBTD5DFS/pages/0/image?height=100" \
  -H Authorization: Token token=secret" \
  -o thumbnail.png

```

To preview a thumbnail of another page, replace the `0` in the URL with the page index you’d like to render.

```bash

curl "http://localhost:5000/api/documents/7KPS35QPZA65Z0DKSDJBTD5DFS/pages/1/image?width=100" \
  -H Authorization: Token token=secret" \
  -o thumbnail.png

```

And finally, if you want the annotation [appearance streams](https://www.nutrient.io/guides/web/annotations/appearance-streams.md) to be rendered in the preview, provide the `render_ap_streams` parameter in the URL.

```bash

curl "http://localhost:5000/api/documents/7KPS35QPZA65Z0DKSDJBTD5DFS/pages/1/image?width=100&render_ap_streams=true" \
  -H Authorization: Token token=secret" \
  -o thumbnail.png

```
---

## Related pages

- [Generate a PDF from images](/guides/document-engine/pdf-generation/from-images.md)
- [Server-side PDF generation](/guides/document-engine/pdf-generation.md)
- [Generate Word documents](/guides/document-engine/pdf-generation/from-word-template.md)

