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

invalid ICC Profile when reading from a byte array

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.9, 1.8.10, 2.0.0
    • 1.8.10, 2.0.0
    • Preflight
    • None
    • W7
      java version "1.7.0_79"
      Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

    Description

      6-1-12-t02-fail-a.pdf has 4 extra fails, that are related to an "invalid" ICC profile. "Invalid" meaning that ICC_Profile.getInstance() fails. Funny thing is that it works when reading from a stream. The following code shows this:

              FileInputStream fis = new FileInputStream(new File("veraPDF test suite 6-1-12-t02-fail-a.icc"));
              ICC_Profile instance = ICC_Profile.getInstance(fis);
              fis.close();
              File iccFile;
              FileInputStream fis2 = new FileInputStream(iccFile = new File("veraPDF test suite 6-1-12-t02-fail-a.icc"));
              byte[] iccBuf = new byte[(int) iccFile.length()];
              fis2.read(iccBuf);
              ICC_Profile instance2 = ICC_Profile.getInstance(iccBuf); // exception
              fis2.close();
      

      That is a java bug

      So I'll have to replace the calls in preflight accordingly. It doesn't apply to the main pdfbox project.

      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: