Improved Confluence page PDF export (only backend)

NOTE: On November 14, 2022, we rolled back the Confluence PDF export feature to its previous implementation. We understand the rollback may impact the performance of this specific feature. We appreciate your patience and understanding while we address the issue.
We will post an additional changelog entry when we are ready to resume the rollout of the new export.

Hey everyone, Nitish here from the Confluence Cloud Migrations team with an update on significant improvements our team has been making to PDF exports! Check it out on the changelog and let me know if you have any questions or concerns in this thread or via a direct message.

Hi @NitishMidha ,
Thank you for the update. Is API access to pdf export on the roadmap?

1 Like

Hi @NitishMidha,
Is there any way to have access to the changes before the releases? So that we can anticipate if we have any compatibility to do before Confluence releases. Many thanks for your help!

1 Like

Hi @marc , Currently there’s no plan for API access as such.

Hi @anon33851861, the new service has already been released for developers, If your site is not part of the program, you can sign up here: Confluence Cloud: Developer-First Rollouts for Ecosystem App Developers

1 Like

Hi,
does this involve any changes to the export_view content format or CSS batches as produced by the /contentbody/convert/export_view REST API?

We’re heavily relying on this API in most of our Confluence Cloud apps and any unannounced changes to the data format might break features in our apps.

Thanks,
Jens

1 Like

@NitishMidha is there a feature request for API access to PDF Export?

@NitishMidha Hey, according to the post the feature should be rolled out for 100% of the instances by now. For us, it only works on one of our Confluence instances, while it doesn’t for all others. Can you verify that it’s rolled out for everyone?

Hi @jens

No, this doesn’t involve any change in export_view. There won’t be any impact on this from the change in pdf export.

Thanks,
Nitish

1 Like

Hi @PhilipFeldmann,

There has been a delay in the rollout and the current plan is to roll it out progressively by October 6. Sorry for the inconvenience.

Thanks,
Nitish

Be cool if the PDF export automatically included screenshots of app macros that don’t specify a renderMode.

That would be a feature-complete PDF export with the behaviour users expect.

1 Like

Hi @NitishMidha,
PDF is still not working for us. It works perfectly fine for some of our instances, but for others, we now get just the text “extension” instead of our macros. Is this a known bug?

EDIT: This bug happens only on “Overview” pages. It works fine for all other pages.

Hi @NitishMidha ,

With the new improvement in the PDF:

Tables are not automatically sized to fit

our eazyBI chart images was only partially visible and displayed too large.

We solved the problem by passing image style style="max-width: 100%;"

QUESTION: Is this the recommended solution to make images to fit the PDF?

Thanks,
Janis

2 Likes

Hi @NitishMidha,
This improvement is really cool. The only thing we found is that dynamic content macros can be exported before they are ready. So in my case I see a spinning wheel instead of a chart in case of a heavy content. Is there any way to flag the macro is ready?
P.S. Did I get it right the headless vrowser is used to render the page for export?

1 Like

Hello @NitishMidha , the changes you’ve rolled out have broken the integration with this wrapper library Confluence module — Atlassian Python API 3.32.2 documentation . Do you know how that can be fixed? This is the error that the library throws when it tries to export the pdf from your api [Confluence Cloud] get_page_as_pdf is not working · Issue #1057 · atlassian-api/atlassian-python-api · GitHub .

Also, exporting as pdf no longer applies the custom CSS we put in “PDF stylesheet” (whether it’s in the global settings or the spaces setting). Has this been disabled on purpose?

Thanks for your time :slight_smile:

1 Like

Hi @eazyBISupport, thanks for making the change, we noticed that eazyBI chart doesn’t automatically resize when confluence window gets resized, hence causing this issue of table not getting printed fully onto the PDF. I’ll check with team if the change has fixed it completely or if their’s anything else required.

Thanks,
Nitish

Hi @akhaneev, can you please confirm if this works fine in case the content is light?
Also, would you be able to share the page and the output?

Thanks,
Nitish

Hi @PhilipFeldmann , can you confirm if the issue is still happening and also if this happens in all spaces for overview page?

Thanks,
Nitish

Hi @NitishMidha
Yes the error is still happening and it happens in all spaces for the overview page. You can try it out yourself in our public documentation:

Hi @NitishMidha,
I tried to reproduce the issue today and found it is working much better than a week ago. I created a very heavy page and reproduced the issue twice, but the other 10 times it worked correctly. That’s really good. See attached pdf (one is OK, and the other one is with the issue).
_akhaneev-Export issue Demo-201022-110959.pdf (224.5 KB)
_akhaneev-Export issue Demo-201022-110906.pdf (33.5 KB)
I still want to understand how it detects the macro readiness when exporting the page to pdf. Just want to be sure how it handles cases when there are asynchronous requests to Confluence REST API (especially the new async REST API).
Thanks,
Andrey