Change in PDF export behaviour with linked images

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."

2 Likes

Additional, the new PDF exporter always fails to include linked PNGs when the old confluence editor is in use. This affects user migrating from server/DC as all the pages default to the old editor after migration.

Tracked as [CONFCLOUD-74949] Allow PDF exports to include dynamic content - Create and track feature requests for Atlassian products.