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

IndexOutOfBound whle creating a Type1C font

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.8.0
    • Component/s: FontBox
    • Labels:

      Description

      As PDFBOX-708 was already closed and the this seems to be an other issue, I created a new issue using the description from PDFBOX-708

      I encountered this issue while trying to add a line of text to a page that uses an embedded Myriad Pro font. I got the same error and switched to trunk, where I got a different error, still on the font parsing: Caused by: java.lang.IndexOutOfBoundsException: Index: 2,Size: 2 at java.util.SubList.rangeCheck(AbstractList.java:746) at java.util.SubList.get(AbstractList.java:619) at org.apache.fontbox.cff.CharStringConverter.drawCurve(CharStringConverter.java:415) at org.apache.fontbox.cff.CharStringConverter.handleType2Command(CharStringConverter.java:277) at org.apache.fontbox.cff.CharStringConverter.handleCommand(CharStringConverter.java:81) at org.apache.fontbox.cff.CharStringHandler.handleSequence(CharStringHandler.java:53) at org.apache.fontbox.cff.CharStringConverter.handleType2Command(CharStringConverter.java:307) at org.apache.fontbox.cff.CharStringConverter.handleCommand(CharStringConverter.java:81) at org.apache.fontbox.cff.CharStringHandler.handleSequence(CharStringHandler.java:53) at org.apache.fontbox.cff.CharStringConverter.handleType2Command(CharStringConverter.java:307) at org.apache.fontbox.cff.CharStringConverter.handleCommand(CharStringConverter.java:81) at org.apache.fontbox.cff.CharStringHandler.handleSequence(CharStringHandler.java:53) at org.apache.fontbox.cff.CharStringConverter.convert(CharStringConverter.java:64) at org.apache.fontbox.cff.CFFFont$Mapping.toType1Sequence(CFFFont.java:374) at org.apache.fontbox.cff.AFMFormatter.renderFont(AFMFormatter.java:126) at org.apache.fontbox.cff.AFMFormatter.printFontMetrics(AFMFormatter.java:64) at org.apache.fontbox.cff.AFMFormatter.printFont(AFMFormatter.java:57) at org.apache.fontbox.cff.AFMFormatter.format(AFMFormatter.java:50) at org.apache.pdfbox.pdmodel.font.PDType1CFont.prepareFontMetric(PDType1CFont.java:502) at org.apache.pdfbox.pdmodel.font.PDType1CFont.load(PDType1CFont.java:381) at org.apache.pdfbox.pdmodel.font.PDType1CFont.<init>(PDType1CFont.java:104) at org.apache.pdfbox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:162) at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:108) at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:81) at org.apache.pdfbox.pdmodel.PDResources.getFonts(PDResources.java:115) at org.apache.pdfbox.pdmodel.PDResources.getFonts(PDResources.java:131) at org.apache.pdfbox.pdmodel.edit.PDPageContentStream.<init>(PDPageContentStream.java:189)

      I can't attach the PDF for copyright reasons, but I narrowed down the problem to an embedded and subset version of MyriadPro. Sample output of pdffonts:
      name type emb sub uni object ID
      ------------------------------------ ----------------- — --- — ---------
      LLUBBA+MyriadPro-LightSemiExt Type 1C yes yes no 2405 0
      LLUBBA+MyriadPro-LightSemiExt Type 1C yes yes yes 2406 0

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lehmi Andreas Lehmkühler
                Reporter:
                jpbougie Jean-Philippe Bougie
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: