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

Ensuring non-null FontDescriptor for external TrueType fonts

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.1.0
    • Component/s: PDModel
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: