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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.15
    • Fix Version/s: 2.0.16, 3.0.0 PDFBox
    • Component/s: PDModel
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: