We’re using the client.documents.previews.download_page_as_png_bytes() function in the Python SDK to retrieve png previews of P&IDs in order to display them in a webapp (Streamlit).
For some P&IDs, the dimensions of the returned png are distorted. The image is in the correct orientation but squashed to fit within a portrait envelope. The affected P&IDs are displayed correctly in both CDF Data Management and when downloaded and opened in a pdf viewer.
Has anyone had this issue before and, if so, did you find a way to handle it?
Question
Document preview page orientation issue
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Check the
documentation
Ask the
Community
Take a look
at
Academy
Cognite
Status
Page
Contact
Cognite Support