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

PDFont.getFontWidth(): ClassCastException: Integer cannot be cast to Float

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Duplicate
    • Affects Version/s: 1.5.0
    • Fix Version/s: None
    • Component/s: PDModel
    • Labels:
      None
    • Environment:
      JDK 1.6.0_24, WIndows XP 32 Bit

      Description

      Just tested upgrading from PDFBox 1.4.0 to 1.5.0. But I get this exception when adding custom text to PDF documents:

      java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Float
      at org.apache.pdfbox.pdmodel.font.PDFont.getFontWidth(PDFont.java:786)
      at org.apache.pdfbox.pdmodel.font.PDSimpleFont.getFontWidth(PDSimpleFont.java:191)
      at org.apache.pdfbox.pdmodel.font.PDFont.getStringWidth(PDFont.java:283)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lehmi Andreas Lehmkühler
                Reporter:
                mhilpert MH
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: