Preview

Preview a single PDF page (file upload)

Upload a PDF and get a single page rendered as PNG or JPEG image. Returns the image directly as binary (not JSON). For multi-page previews, use the /api/preview/pages endpoint.

post/api/preview

Request

  • Base URL: https://api.dokmatiq.com
  • URL: https://api.dokmatiq.com/api/preview
  • Auth: API key in header X-API-Key

Query parameters

pageinteger

Page number (1-based, default: 1)

formatstring

Image format: PNG or JPEG

dpiinteger

Rendering DPI (default: 96, max: 300)

maxWidthinteger

Max width in pixels (0 = no scaling)

Response

Page preview image

Changes

No recorded changes to this operation across all 1 revision of this API.