We’re seeing failures adding drawio diagram PNGs to PDF export on confluence cloud. This seems to be a problem for the old confluence editor and when the PNG attachment isn’t on the page being exported.
The renderMode definition for drawio is:
"renderModes": {
"default": {
"url": "/connectRender?pageId=${content.id}&diagramName=${diagramName}&tempPreview=${tempPreview}&width=${width}&height=${height}&zoom=${zoom}"
}
i.e. the same call is made for both Word and PDF export. We return the same <ac:image
storage format value for both word and PDF.
We use the storage format defined in Confluence Storage Format | Confluence Data Center and Server 8.3 | Atlassian Documentation for “External Images” under the “Images” section.
This has worked correctly for years, but something has changed in the two cases mentioned.
The ac:image link we return is of format “{{/download/attachments/”}} , i.e a relative link to download the attachment.
This always works in Word, including for the old confluence editor and PNG attachments of different pages. Word and PDF use the same ac:image value. If we construct the URL manually it shows the correct image (which it must for the export in Word to work).
I’m guessing this relates to https://developer.atlassian.com/cloud/confluence/changelog/ :
“13 April 2023
Announcement Re-rollout of improved space PDF export
To provide better quality PDF content, we’ve rearchitected the backend supporting the export of Confluence space to PDF. The change is rolling out to customers progressively and is expected to be with 100% of customers by May 1, 2023. This change does not require you to do anything. However, if you perform a PDF export and notice any issues, please report them on the developer community forums."