Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3748

java.lang.UnsupportedOperationException: Kerning table version 0 format 2 not yet supported.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 2.0.5
    • Fix Version/s: 2.0.6, 3.0.0 PDFBox
    • Component/s: FontBox
    • Labels:
      None

      Description

      Hi everyone, I am currently using pdfbox to extract text from pdf files and I an encountering an UnsupportedOperationException while trying to extract text from provided file (file.pdf)

      ...
      Caused by: java.lang.UnsupportedOperationException: Kerning table version 0 format 2 not yet supported.
      at org.apache.fontbox.ttf.KerningSubtable.readSubtable0Format2(KerningSubtable.java:231)
      at org.apache.fontbox.ttf.KerningSubtable.readSubtable0(KerningSubtable.java:215)
      at org.apache.fontbox.ttf.KerningSubtable.read(KerningSubtable.java:70)
      at org.apache.fontbox.ttf.KerningTable.read(KerningTable.java:80)
      at org.apache.fontbox.ttf.TrueTypeFont.readTable(TrueTypeFont.java:324)
      at org.apache.fontbox.ttf.TTFParser.parseTables(TTFParser.java:174)
      at org.apache.fontbox.ttf.TTFParser.parse(TTFParser.java:150)
      at org.apache.fontbox.ttf.TTFParser.parse(TTFParser.java:106)
      at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.<init>(PDTrueTypeFont.java:178)
      at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:75)
      at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:143)
      at org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:829)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:486)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:460)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
      at org.apache.pdfbox.text.LegacyPDFStreamEngine.processPage(LegacyPDFStreamEngine.java:139)
      at org.apache.pdfbox.text.PDFTextStripper.processPage(PDFTextStripper.java:391)
      at org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:319)
      at org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:266)
      at org.apache.pdfbox.text.PDFTextStripper.getText(PDFTextStripper.java:227)
      ...

      I would like to understand what in my file causes this error and if anyone knows a workaround to perform text extraction successfully on this file.
      Thank you in advance guys

        Attachments

        1. file.pdf
          567 kB
          Thomas Penne

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              tpenne Thomas Penne
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: