Retrieve a PDF preview of a document

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.

Only the 100 first pages will be included.

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

header Parameters
cdf-version
string

cdf version header. Use this to specify the requested CDF release.

Example: alpha
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/pdf
Request samples
client.documents.previews.download_document_as_pdf("previews", id=123)
content = client.documents.previews.download_document_as_pdf_bytes(id=123)
Response samples
application/json
{
  • "error": {
    • "code": 401,
    • "message": "Could not authenticate.",
    • "missing": [
      ],
    • "duplicated": [
      ]
    }
}