Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
1
-
Description
Problem Definition
Confluence fails when attempting a PDF space export which is larger than 2GB. If the PDF gets larger than 2GB, the exception below is thrown in the atlassian-confluence.log file:
2019-05-28 10:56:55,254 ERROR [Long running task: PDF Space Export] [core.task.longrunning.AbstractLongRunningTask] doInTransactionWithoutResult Error during PDF export -- url: /spaces/flyingpdf/doflyingpdf.action | referer: https://baseurl/spaces/flyingpdf/flyingpdf.action?key=FTS | traceId: df54d5bdae3red4e48 | userName: admin | action: doflyingpdf java.lang.IllegalArgumentException: Size exceeds Integer.MAX_VALUE
There is an error in the GUI, but is not clear why the error is occurring:
This is caused by a 2GB limit for PDF exports, due to the libraries utilized.
- Flying Saucer v9.1.6 library is used to render XHTML in memory for a space/page export.
- Flying Saucer uses iText v2.1.7 library to export the rendered contents into a PDF file.
- The iText library prior version 5.3 has the limitation of 2GB for generated files.
- This limitation exists due to java.nio.channels.FileChannel limit of 2GB for memory mapped files.
Suggested Solution
One or more of the following options:
- Improve the error message, which indicates the 2GB limit and update Confluence documentation to reflect the 2GB Limit.
- Update Confluence to use a version of FlyingSaucer/iText that doesn't have the 2GB limit.
- Update Confluence to export/compose the PDF to the file system and not directly to memory.
Workarounds
Split the larger spaces into smaller spaces.
Additionally, we have tested a third party app that works with larger exports. Consider trying Content Exporter (Word, PDF, HTML) if you require a single PDF that will be larger than 2GB.
Attachments
Issue Links
- mentioned in
-
Page Loading...