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

PDLineDashPattern fails as float[] is converted to List<float[]> instead of List<Float>

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.15
    • 2.0.16, 3.0.0 PDFBox
    • PDModel
    • None

    Description

       The following code fails in PDLineDashPattern as Arrays.asList doesn't work as expected with primitive arrays.

      public COSBase getCOSObject()
      {
        COSArray cos = new COSArray();
        cos.add(COSArrayList.converterToCOSArray(Arrays.asList(array)));
        cos.add(COSInteger.get(phase));
        return cos;
      }

      The array should be converted using:

      COSArray patternArray = new COSArray();
      patternArray.setFloatArray(array);
      cos.add(patternArray);

       

       

       

      Attachments

        Issue Links

          Activity

            People

              tilman Tilman Hausherr
              pauldaustin Paul Austin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: