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

Ensuring non-null FontDescriptor for external TrueType fonts

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.0
    • 1.1.0
    • PDModel
    • None

    Description

      Class PDTrueTypeFont assumes that there is always a non-null FontDescriptor(Dictionary) available. However, I've seen this assumption failing with a NullPointerException in method PDTrueTypeFont#drawString when trying to render PDF documents that make use of external TrueType fonts.

      I've implemented a small patch that initializes empty FontDescriptorDictionary if one is missing, and tries to fill it in with information available from the external TTF resource.

      Attachments

        1. PDFBox.patch
          3 kB
          Villu Ruusmann

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vfed Villu Ruusmann
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: