PDF export throws Error while exporting
Asked by Avin Singhal:

### Cause {#toc-hId-1621042941}

com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document /opt/confluence/data/temp/pdfexport-20180613-130618-0857-143/MA-ExtractCalibrationParameters-v1.4.6-130618-0857-144.pdf  
at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:87)

caused by: java.lang.RuntimeException: Failed to read image  
at com.atlassian.confluence.extra.flyingpdf.LightITextFSImage.getImage(LightITextFSImage.java:106)

caused by: java.lang.NullPointerException  
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2146)

#### Stack Trace:\[hide\] {#toc-hId--1127627525}

```
com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document /opt/confluence/data/temp/pdfexport-20180613-130618-0857-143/MA-ExtractCalibrationParameters-v1.4.6-130618-0857-144.pdf	at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:87)	at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:44)	at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForPage(FlyingSaucerPdfExporterService.java:95)	at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.doExecute(ExportPageAsPdfAction.java:40)	at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.execute(ExportPageAsPdfAction.java:29)	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)	at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:33)	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)		at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)	at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)	at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)	at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:232)	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:209)	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)	at net.bull.javamelody.JiraMonitoringFilter.doFilter(JiraMonitoringFilter.java:134)	at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)	at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)	at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)	at com.atlassian.confluence.extra.webdav.servlet.filter.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:467)	at com.atlassian.confluence.extra.webdav.servlet.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:34)	at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)	at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)	at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70)	at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.confluence.internal.web.filter.spring.IgnoreWebAsyncManagerFilter.doFilter(IgnoreWebAsyncManagerFilter.java:59)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:51)	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.confluence.web.filter.TranslationModeFilter.doFilter(TranslationModeFilter.java:39)	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:72)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:49)	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.confluence.impl.vcache.VCacheRequestContextFilter.lambda$doFilter$3(VCacheRequestContextFilter.java:44)	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:87)	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:71)	at com.atlassian.confluence.impl.vcache.VCacheRequestContextFilter.doFilter(VCacheRequestContextFilter.java:43)	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:33)	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:65)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.github.kristofa.brave.servlet.BraveServletFilter.doFilter(BraveServletFilter.java:59)	at com.atlassian.confluence.web.filter.ZipkinTracingFilter.doFilter(ZipkinTracingFilter.java:52)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.confluence.web.filter.ResponseOutputStreamFilter.doFilter(ResponseOutputStreamFilter.java:23)	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:72)	at com.atlassian.confluence.web.ConfluenceJohnsonFilter.doFilter(ConfluenceJohnsonFilter.java:33)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41)	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.confluence.impl.servlet.HoldingUntilStartedFilter.doFilter(HoldingUntilStartedFilter.java:88)	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:46)	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)	at org.apache.catalina.valves.StuckThreadDetectionValve.invoke(StuckThreadDetectionValve.java:206)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)	at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:877)	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533)	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)	at java.lang.Thread.run(Thread.java:748)Caused by: java.lang.RuntimeException: Failed to read image	at com.atlassian.confluence.extra.flyingpdf.LightITextFSImage.getImage(LightITextFSImage.java:106)	at org.xhtmlrenderer.pdf.ITextOutputDevice.drawImage(ITextOutputDevice.java:768)	at org.xhtmlrenderer.pdf.ITextImageElement.paint(ITextImageElement.java:72)	at org.xhtmlrenderer.pdf.ITextOutputDevice.paintReplacedElement(ITextOutputDevice.java:183)	at org.xhtmlrenderer.layout.Layer.paintReplacedElement(Layer.java:569)	at org.xhtmlrenderer.layout.Layer.paintReplacedElements(Layer.java:526)	at org.xhtmlrenderer.layout.Layer.paintAsLayer(Layer.java:500)	at org.xhtmlrenderer.render.BlockBox.paintInline(BlockBox.java:279)	at org.xhtmlrenderer.layout.Layer.paintInlineContent(Layer.java:275)	at org.xhtmlrenderer.layout.Layer.paint(Layer.java:348)	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:76)	... 401 moreCaused by: java.lang.NullPointerException	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2146)	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2102)	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2123)	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2078)	at com.atlassian.confluence.extra.flyingpdf.LightITextFSImage.getImage(LightITextFSImage.java:100)	... 414 more        
```


Answers:
author: Avin Singhal
body: I guess this is the BUG on Plugin part as per my serach

**BUG :** <https://thepluginpeople.atlassian.net/browse/CLATEX-16>.

This is a known issue, [CLATEX-16](https://thepluginpeople.atlassian.net/browse/CLATEX-16)**Open**

Waiting for it to be fixed


author: Shannon S
body: Hi there,

Does this occur when exporting a specific page in Confluence? Can you check if it contains any images?

What version of Confluence are you using?

Shannon

comments: author: Avin Singhal
body: Confluence Version 6.2.4

Well nopes it does not occur for all pages in confluence rather it occur on specific pages with Latex formula images.

I guess this is the BUG on Plugin part as per my serach

**BUG :** <https://thepluginpeople.atlassian.net/browse/CLATEX-16>.

This is due to latex formula images present in the page:

Raised and support request to plugin vendor [SUPPORT-2891](https://thepluginpeople.atlassian.net/browse/SUPPORT-2891)

Sad part id they closed the issue stating......

Hello,

This is a known issue, [CLATEX-16](https://thepluginpeople.atlassian.net/browse/CLATEX-16)**Open**

The Latex plugin is a free plugin and is only being maintained for compatibility with new Confluence versions. No active development feature development of the plugin is being undertaken at this time. It is unlikely the problem you describe will be resolved in the short term. Please watch the related issue for any future updates.

Best Regards

Avin Singhal


author: Shannon S
body: Avin,

Thank you for letting me know you were able to determine the issue. I'm sorry to hear the information you found.

I've tagged the vendor on this in case they have any feedback but it's likely that there haven't been any updates since the last one you saw.

Regards,

Shannon


Tags: addon-com.stepstonetech.confluence.plugins.latex

atlassian-marketplace