Currently, we use Confluence Server 7.5.2.
We have a Jenkins job that builds each night to export all our spaces in PDF (it is an internal requirement).
However, this action take a lot of CPU, a lot of memory and pollute our logs with a lot of warnings :
15-Jan-2021 08:14:02.542 WARNING [Catalina-utility-1] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadCompleted Thread [http-nio-8090-exec-5] (id=) was previously reported to be stuck but has completed. It was active for approximately [24,348,599] milliseconds. There is/are still  thread(s) that are monitored by this Valve and may be stuck.
com.atlassian.confluence.content.render.xhtml.XhtmlException: RuntimeException occurred while performing an XHTML storage transformation (null)
We have thus contacted the Atlassian Support for help and advices and it advices us to export our spaces in XML and, then, to convert this XML to PDF.
Do you have any documentation or examples to help us ?
We have not found any documentation page to perform that.
More information : we have written a Python script for the XML export.