Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-33863

Failed export to PDF due to "BMP version 5 not implemented yet."

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Summary

      Pages containing certain types of .bmp files will fail to be imported out to PDF. This affects both single-page PDF exports or space-level PDF exports that includes this page.

      Steps to Reproduce

      1. Have a Confluence page
      2. Add the attached bmp file to the page example.bmp
      3. Export this page to PDF (Page tools > Export to PDF)

      Expected Results

      PDF export created succesfully

      Actual Results

      Export failed.
      The below exception is thrown in the atlassian-confluence.log file:

      2014-05-28 17:50:02,236 ERROR [Long running task: PDF Space Export] [core.task.longrunning.AbstractLongRunningTask] doInTransactionWithoutResult Error during PDF export
       -- url: /spaces/flyingpdf/doflyingpdf.action | userName: admin | referer: http://localhost:5542/spaces/flyingpdf/flyingpdf.action?key=TEST | action: doflyingpdf
      com.atlassian.confluence.importexport.ImportExportException: Exception thrown while rendering the page 'Test Page' to the PDF document /Users/rchang/atl/conf542/home/temp/pdfexport-20140528-280514-1747-6/TEST-280514-1747-7.pdf
      	at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:111)
      	at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForSpace(FlyingSaucerPdfExporterService.java:60)
      	at com.atlassian.confluence.extra.flyingpdf.PdfExportLongRunningTask$1.doInTransactionWithoutResult(PdfExportLongRunningTask.java:72)
      	at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
      	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
      	at com.atlassian.confluence.extra.flyingpdf.PdfExportLongRunningTask.runInternal(PdfExportLongRunningTask.java:52)
      	at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26)
      	at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:744)
      Caused by: java.lang.RuntimeException: Failed to read image
      	at com.atlassian.confluence.extra.flyingpdf.LightITextFSImage.getImage(LightITextFSImage.java:128)
      	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:554)
      	at org.xhtmlrenderer.layout.Layer.paintReplacedElements(Layer.java:511)
      	at org.xhtmlrenderer.layout.Layer.paintAsLayer(Layer.java:485)
      	at org.xhtmlrenderer.render.BlockBox.paintInline(BlockBox.java:265)
      	at org.xhtmlrenderer.layout.Layer.paintInlineContent(Layer.java:274)
      	at org.xhtmlrenderer.layout.Layer.paint(Layer.java:346)
      	at org.xhtmlrenderer.pdf.ITextRenderer.paintPage(ITextRenderer.java:384)
      	at org.xhtmlrenderer.pdf.ITextRenderer.writePDF(ITextRenderer.java:348)
      	at org.xhtmlrenderer.pdf.ITextRenderer.createPDF(ITextRenderer.java:315)
      	at org.xhtmlrenderer.pdf.ITextRenderer.createPDF(ITextRenderer.java:246)
      	at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:94)
      	... 12 more
      Caused by: java.lang.RuntimeException: BMP version 5 not implemented yet.
      	at com.lowagie.text.pdf.codec.BmpImage.process(Unknown Source)
      	at com.lowagie.text.pdf.codec.BmpImage.<init>(Unknown Source)
      	at com.lowagie.text.pdf.codec.BmpImage.getImage(Unknown Source)
      	at com.lowagie.text.pdf.codec.BmpImage.getImage(Unknown Source)
      	at com.lowagie.text.pdf.codec.BmpImage.getImage(Unknown Source)
      	at com.lowagie.text.Image.getInstance(Unknown Source)
      	at com.atlassian.confluence.extra.flyingpdf.LightITextFSImage.getImage(LightITextFSImage.java:122)
      	... 26 more
      

      Notes

      In the case of generating space-level PDF exports, it's worth noting that the page referenced in the error is not necessarily the page that contains the BMP files. It is simply the name of the last page generated; the actual problematic page could be elsewhere.

      Workaround

      Take out the .bmp images from the page first before proceeding with the export

      Attachments

        Issue Links

          Activity

            People

              mbereznitsky Mark Bereznitsky
              rchang Robert Chang
              Votes:
              11 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: