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

IllegalArgumentException: -Infinity is not a finite number

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.30, 3.0.1 PDFBox
    • 2.0.31, 3.0.2 PDFBox, 4.0.0
    • AcroForm
    • None

    Description

      Exception in thread "main" java.lang.IllegalArgumentException: -Infinity is not a finite number
      	at org.apache.pdfbox.pdmodel.PDAbstractContentStream.writeOperand(PDAbstractContentStream.java:1392)
      	at org.apache.pdfbox.pdmodel.PDAbstractContentStream.setFont(PDAbstractContentStream.java:217)
      	at org.apache.pdfbox.pdmodel.PDAppearanceContentStream.setFont(PDAppearanceContentStream.java:36)
      	at org.apache.pdfbox.pdmodel.interactive.form.PDDefaultAppearanceString.writeTo(PDDefaultAppearanceString.java:297)
      	at org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.insertGeneratedAppearance(AppearanceGeneratorHelper.java:531)
      	at org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.setAppearanceContent(AppearanceGeneratorHelper.java:447)
      	at org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.setAppearanceValue(AppearanceGeneratorHelper.java:263)
      	at org.apache.pdfbox.pdmodel.interactive.form.PDTextField.constructAppearances(PDTextField.java:262)
      

      I was able to reproduce it with the CreateSimpleForm example by using a 0 font size, an empty string and a field rectangle width of 1.

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            tilman Tilman Hausherr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: