Retrieve a image preview of a page from a document

This endpoint returns a rendered image preview for a specific page of the specified document.

The accept request header MUST be set to image/png. Other values will give an HTTP 406 error.

The rendered image will be downsampled to a maximum of 2400x2400 pixels. Only PNG format is supported and only the first 10 pages can be rendered.

Previews will be rendered if neccessary during the request. Be prepared for the request to take a few seconds to complete.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
path Parameters
documentId
required
integer

Internal ID for document to preview

pageNumber
required
integer [ 1 .. 10 ]

Page number to preview. Starting at 1 for first page

Responses
200

OK

400

The response for a failed request.

401

The response for a failed request.

406

The response for a failed request.

422

The response for a failed request.

get/documents/{documentId}/preview/image/pages/{pageNumber}
Request samples
client.documents.previews.download_page_as_png("previews", id=123, page_number=5)
content = client.documents.previews.download_page_as_png_bytes(id=123, page_number=5)

from IPython.display import Image
binary_png = client.documents.previews.download_page_as_png_bytes(id=123, page_number=5)
Image(binary_png)
Response samples
application/json
{
  • "error": {
    • "code": 401,
    • "message": "Could not authenticate.",
    • "missing": [
      ],
    • "duplicated": [
      ]
    }
}