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>"Required capabilities:
filesAcl:READ
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.
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>"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.
Internal ID for document to preview
Page number to preview. Starting at 1 for first page
1 <= x <= 10OK
Rendered PNG image
Was this page helpful?