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

The TrueType font does not contain a 'cmap' table

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.0.3
    • Fix Version/s: None
    • Component/s: FontBox
    • Labels:
      None
    • Environment:
      debian stable, java8

      Description

      http://www.fonts2u.com/code2000.font is read in an inputstream and then made to a PDFont.

      If I make this a static PDFont variable to only once read it from disk and use it more than once, it only works with the first document I create and thereafter I get the below error.

      Wouldn't it be nice to have this idempotent or at least with a reset() method?

      java.io.IOException: The TrueType font does not contain a 'cmap' table
      at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmap(TrueTypeFont.java:477)
      at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmap(TrueTypeFont.java:460)
      at org.apache.fontbox.ttf.TTFSubsetter.<init>(TTFSubsetter.java:89)
      at org.apache.pdfbox.pdmodel.font.TrueTypeEmbedder.subset(TrueTypeEmbedder.java:302)
      at org.apache.pdfbox.pdmodel.font.PDType0Font.subset(PDType0Font.java:162)
      at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1138)
      at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1118)
      at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1106)

      see also PDFBOX-3162

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hauser@acm.org Ralf Hauser
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: