client.documents.previews.download_document_as_pdf("previews", id=123)
content = client.documents.previews.download_document_as_pdf_bytes(id=123)"<string>"Required capabilities:
filesAcl:READ
This endpoint returns a rendered PDF preview for a specified document.
The accept request header MUST be set to application/pdf. Other values will
give an HTTP 406 error.
This endpoint is optimized for in-browser previews. We reserve the right to adjust the quality and other attributes of the output with this in mind. Please reach out to us if you have a different use case and requirements.
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_document_as_pdf("previews", id=123)
content = client.documents.previews.download_document_as_pdf_bytes(id=123)"<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.
cdf version header. Use this to specify the requested CDF release.
"alpha"
Internal ID for document to preview
OK
Rendered PDF document
Was this page helpful?