com.sun.pdfview.PDFParseException: Unknown coding method:JBIG2Decode

Atlassian JIRA | pWestrich | 3 years ago
  1. 0

    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: {code} 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) {code} 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: {code} 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) {code}

    Atlassian JIRA | 3 years ago | pWestrich
    com.sun.pdfview.PDFParseException: Unknown coding method:JBIG2Decode
  2. 0

    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: {code} 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) {code} 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: {code} 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) {code}

    Atlassian JIRA | 3 years ago | pWestrich
    com.sun.pdfview.PDFParseException: Unknown coding method:JBIG2Decode
  3. 0

    [CONF-30388] Blank Preview in PDF Preview Macro - Atlassian JIRA

    atlassian.com | 1 year ago
    com.sun.pdfview.PDFParseException: Unknown coding method:JBIG2Decode
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Pure Java Print PDF Open Source API | WebMoli - Rediscover the Basics

    webmoli.com | 1 year ago
    com.sun.pdfview.PDFParseException: Unsupported shader type: 3
  6. 0

    iText®, a JAVA PDF library / Mailing Lists

    sourceforge.net | 1 year ago
    com.sun.pdfview.PDFParseException: Unknown command: qq

  1. Puneet Nebhani 1 times, last 4 months ago
3 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.sun.pdfview.PDFParseException

    Unknown coding method:JBIG2Decode

    at com.sun.pdfview.decode.PDFDecoder.decodeStream()
  2. PDF Renderer
    BaseWatchable.run
    1. com.sun.pdfview.decode.PDFDecoder.decodeStream(PDFDecoder.java:114)
    2. com.sun.pdfview.PDFObject.decodeStream(PDFObject.java:344)
    3. com.sun.pdfview.PDFObject.getStream(PDFObject.java:276)
    4. com.sun.pdfview.PDFObject.getStream(PDFObject.java:270)
    5. com.sun.pdfview.PDFImage.getImage(PDFImage.java:224)
    6. com.sun.pdfview.PDFRenderer.drawImage(PDFRenderer.java:284)
    7. com.sun.pdfview.PDFImageCmd.execute(PDFPage.java:643)
    8. com.sun.pdfview.PDFRenderer.iterate(PDFRenderer.java:583)
    9. com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101)
    9 frames
  3. com.benryan.conversion
    AbstractSlideConversionTask.call
    1. com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:100)
    2. com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:27)
    3. com.benryan.conversion.AbstractSlideConversionTask.call(AbstractSlideConversionTask.java:44)
    3 frames
  4. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:138)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    5. java.lang.Thread.run(Thread.java:662)
    5 frames