Skip to main content
Committed ⭐️⭐️⭐️
Aug 7, 2025 2:46 PM UTC
Question

Document preview page orientation issue

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?
 

3 replies

Mithila Jayalath
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
Aug 8, 2025 12:27 PM UTC

​@Christian Toftegaard I’ll check on this and get back to you with an update.

Committed ⭐️⭐️⭐️
Aug 20, 2025 1:16 PM UTC

​@Mithila Jayalath Any news on this? Are you able to replicate the problem?

Mithila Jayalath
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
Aug 21, 2025 12:27 PM UTC

Apologies for the delayed response. I was unable to reproduce the issue on my end. To help us troubleshoot further, could you please share one of the problematic PDFs? I will open a support ticket so that you can securely share it there.