Space export to PDF fails during conversion of intermediate HTML to PDF
プラットフォームについて: Cloud および Data Center - この記事はクラウドと Data Center 両方のプラットフォームに等しく適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
When exporting a space to PDF the export progress stops and fails during {{Begin conversion of intermediate HTML to PDF}} of the export process. The following error will be in the UI:
Failed during PDF export. Exception message - Exception while rendering the PDF document <confluence_home>/temp/pdfexport-20161225-251216-1159-11/TEST-251216-1159-12.pdf
The following appears also in the atlassian-confluence.log
file. Specifically the stacktrace below the Caused by referring tot he xhtml render issues.
2016-11-22 11:48:10,688 ERROR [Long running task: PDF Space Export] [core.task.longrunning.AbstractLongRunningTask] doInTransactionWithoutResult Error during PDF export
-- referer: http://localhost:8599/conf/spaces/flyingpdf/flyingpdf.action?key=TEST | url: /conf/spaces/flyingpdf/doflyingpdf.action | userName: admin | action: doflyingpdf
com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document /Users/admin/atl/confluence/599/home/temp/pdfexport-20161122-221116-1147-11/TEST-221116-1147-12.pdf
at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:102)
at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForSpace(FlyingSaucerPdfExporterService.java:73)
at com.atlassian.confluence.extra.flyingpdf.PdfExportLongRunningTask$1.doInTransactionWithoutResult(PdfExportLongRunningTask.java:77)
[...]
Caused by: java.lang.NullPointerException
at org.xhtmlrenderer.layout.Layer.paint(Layer.java:365)
at org.xhtmlrenderer.layout.Layer.paintLayers(Layer.java:166)
at org.xhtmlrenderer.layout.Layer.paint(Layer.java:353)
at org.xhtmlrenderer.pdf.ITextRenderer.paintPage(ITextRenderer.java:505)
at org.xhtmlrenderer.pdf.ITextRenderer.writePageByPage(ITextRenderer.java:302)
at org.xhtmlrenderer.pdf.ITextRenderer.layoutAndPaint(ITextRenderer.java:329)
at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:89)
... 12 more
診断
環境
原因
The XHTML renderer is experiencing problems with HTML somewhere in the space and is unable to export it.
回避策
- Disable the HTML macros to successfully export the content
- Or remove the HTML content until you're able to find the offending content, however there could be multiple pieces of content causing issues