Skip to main content
GET
/
documents
/
{documentId}
/
preview
/
image
/
pages
/
{pageNumber}
Python SDK
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)
"<string>"

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Path Parameters

documentId
integer
required

Internal ID for document to preview

pageNumber
integer
required

Page number to preview. Starting at 1 for first page

Required range: 1 <= x <= 10

Response

OK

Rendered PNG image

Last modified on April 23, 2026