Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-30388

Blank Preview in PDF Preview Macro

XMLWordPrintable

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

      The PDF preview can't render certain PDFs and will display only blank, white pages.

      The problem occurred with scanned documents which where saved with JBIG2 image compression (the default for Acrobat 5.0 and newer).

      This is the resulting stack trace:

      Error reading image                  
      com.sun.pdfview.PDFParseException: Unknown coding method:JBIG2Decode
                  at com.sun.pdfview.decode.PDFDecoder.decodeStream(PDFDecoder.java:114)
                  at com.sun.pdfview.PDFObject.decodeStream(PDFObject.java:344)
                  at com.sun.pdfview.PDFObject.getStream(PDFObject.java:276)
                  at com.sun.pdfview.PDFObject.getStream(PDFObject.java:270)
                  at com.sun.pdfview.PDFImage.getImage(PDFImage.java:224)
                  at com.sun.pdfview.PDFRenderer.drawImage(PDFRenderer.java:284)
                  at com.sun.pdfview.PDFImageCmd.execute(PDFPage.java:643)
                  at com.sun.pdfview.PDFRenderer.iterate(PDFRenderer.java:583)
                  at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101)
                  at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:100)
                  at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:27)
                  at com.benryan.conversion.AbstractSlideConversionTask.call(AbstractSlideConversionTask.java:44)
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
                  at java.util.concurrent.FutureTask.run(FutureTask.java:138)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                  at java.lang.Thread.run(Thread.java:662)
      java.lang.NullPointerException
                  at com.sun.pdfview.font.TTFFont.getOutline(TTFFont.java:171)
                  at com.sun.pdfview.font.CIDFontType2.getOutline(CIDFontType2.java:270)
                  at com.sun.pdfview.font.OutlineFont.getGlyph(OutlineFont.java:130)
                  at com.sun.pdfview.font.PDFFont.getCachedGlyph(PDFFont.java:308)
                  at com.sun.pdfview.font.PDFFontEncoding.getGlyphFromCMap(PDFFontEncoding.java:155)
                  at com.sun.pdfview.font.PDFFontEncoding.getGlyphs(PDFFontEncoding.java:115)
                  at com.sun.pdfview.font.PDFFont.getGlyphs(PDFFont.java:274)
                  at com.sun.pdfview.PDFTextFormat.doText(PDFTextFormat.java:269)
                  at com.sun.pdfview.PDFParser.iterate(PDFParser.java:745)
                  at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101)
                  at com.sun.pdfview.BaseWatchable.execute(BaseWatchable.java:263)
                  at com.sun.pdfview.BaseWatchable.go(BaseWatchable.java:197)
                  at com.sun.pdfview.PDFFile.getPage(PDFFile.java:1546)
                  at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:86)
                  at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:27)
                  at com.benryan.conversion.AbstractSlideConversionTask.call(AbstractSlideConversionTask.java:44)
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
                  at java.util.concurrent.FutureTask.run(FutureTask.java:138)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                  at java.lang.Thread.run(Thread.java:662)
      

      Saving the file with CCITT Group 4 compression (see screenshot) will serve as workaround, i.e. the preview will be able to render the image, but the parser still outputs an (different) error:

       java.lang.NullPointerException
              at com.sun.pdfview.font.TTFFont.getOutline(TTFFont.java:171)
              at com.sun.pdfview.font.CIDFontType2.getOutline(CIDFontType2.java:270)
              at com.sun.pdfview.font.OutlineFont.getGlyph(OutlineFont.java:130)
              at com.sun.pdfview.font.PDFFont.getCachedGlyph(PDFFont.java:308)
              at com.sun.pdfview.font.PDFFontEncoding.getGlyphFromCMap(PDFFontEncoding.java:155)
              at com.sun.pdfview.font.PDFFontEncoding.getGlyphs(PDFFontEncoding.java:115)
              at com.sun.pdfview.font.PDFFont.getGlyphs(PDFFont.java:274)
              at com.sun.pdfview.PDFTextFormat.doText(PDFTextFormat.java:269)
              at com.sun.pdfview.PDFParser.iterate(PDFParser.java:745)
              at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101)
              at com.sun.pdfview.BaseWatchable.execute(BaseWatchable.java:263)
              at com.sun.pdfview.BaseWatchable.go(BaseWatchable.java:197)
              at com.sun.pdfview.PDFFile.getPage(PDFFile.java:1546)
              at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:86)
              at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:27)
              at com.benryan.conversion.AbstractSlideConversionTask.call(AbstractSlideConversionTask.java:44)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662)
      

              Unassigned Unassigned
              7274964fa949 pWestrich
              Votes:
              16 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: