PDFBox
  1. PDFBox
  2. PDFBOX-1274

Another Invalid Color Space, DestOutputProfile , passes commercial validators

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.8.0
    • Component/s: Preflight
    • Labels:
      None
    • Environment:
      LInux etc

      Description

      kun_muutat_suomeenEN.pdf.pdf is not valid, error(s):
      2.4.3 | Invalid Color space, Invalid Color space, DestOutputProfile is missing

      1. paed_live.2.8.cv.60091.5232144.0_A.pdf
        307 kB
        William Fausser
      2. kun_muutat_suomeenEN.pdf.pdf
        107 kB
        William Fausser

        Activity

        Hide
        Eric Leleu added a comment -

        Hi,

        It's OK for me.
        William, if you still have issues with these files, please reopen this issue.

        BR,
        Eric

        Show
        Eric Leleu added a comment - Hi, It's OK for me. William, if you still have issues with these files, please reopen this issue. BR, Eric
        Hide
        Guillaume Bailleul added a comment -

        Hi William and Eric,

        I made some (huge) modifications on xmpbox (the patch size is 620k) and I am preparing the commit.

        I implemented missing namespaces ( except exif I still have to do) and all structured types defined in xmp specification (ResourceEvent is one of them).

        On my version, the paed_xxx file is valid.

        BR,

        Guillaume

        Show
        Guillaume Bailleul added a comment - Hi William and Eric, I made some (huge) modifications on xmpbox (the patch size is 620k) and I am preparing the commit. I implemented missing namespaces ( except exif I still have to do) and all structured types defined in xmp specification (ResourceEvent is one of them). On my version, the paed_xxx file is valid. BR, Guillaume
        Hide
        William Fausser added a comment -

        Hi Eric,

        Thanks for your help. I only have the Metadata error now.

        Regards,
        Bill

        Show
        William Fausser added a comment - Hi Eric, Thanks for your help. I only have the Metadata error now. Regards, Bill
        Hide
        Eric Leleu added a comment -

        Hi William,

        The validation works for the color space issue when I use the new prefligth implementation (The metadata problem is still present).
        Currently, the jar with dependendies still uses the "old implementation" as main class.

        To use the "new implementation" please try this command line :

        java -classpath /home/fausser/preflight-1.8.0-20120715.180423-19-jar-with-dependencies.jar org.apache.pdfbox.preflight.Validator_A1b /home/fausser/paed_live.2.8.cv.60091.5232144.0_A.pdf

        Hope you will only have the Metadata error.

        When the refactoring will be finished (it is close to be done) the "old implementation" will be deleted and so the "org.apache.pdfbox.preflight.Validator_A1b" class will be set as the entry point in the preflight jar.

        BR,
        Eric

        Show
        Eric Leleu added a comment - Hi William, The validation works for the color space issue when I use the new prefligth implementation (The metadata problem is still present). Currently, the jar with dependendies still uses the "old implementation" as main class. To use the "new implementation" please try this command line : java -classpath /home/fausser/preflight-1.8.0-20120715.180423-19-jar-with-dependencies.jar org.apache.pdfbox.preflight.Validator_A1b /home/fausser/paed_live.2.8.cv.60091.5232144.0_A.pdf Hope you will only have the Metadata error. When the refactoring will be finished (it is close to be done) the "old implementation" will be deleted and so the "org.apache.pdfbox.preflight.Validator_A1b" class will be set as the entry point in the preflight jar. BR, Eric
        Hide
        William Fausser added a comment -

        Hi Eric,

        I'm retesting :
        The file/home/fausser/paed_live.2.8.cv.60091.5232144.0_A.pdf is not valid, error(s) :
        2.4.3 : Invalid Color space, DestOutputProfile is missing
        2.4.3 : Invalid Color space, DestOutputProfile is missing
        2.4.3 : Invalid Color space, DestOutputProfile is missing
        2.4.3 : Invalid Color space, DestOutputProfile is missing
        2.4.3 : Invalid Color space, DestOutputProfile is missing
        2.4.3 : Invalid Color space, DestOutputProfile is missing
        7.3 : Error on MetaData, Cannot find a definition for the namespace 'http://ns.adobe.com/xap/1.0/sType/ResourceEvent#'

        I'm using :
        java -jar /home/fausser/preflight-1.8.0-20120715.180423-19-jar-with-dependencies.jar /home/fausser/paed_live.2.8.cv.60091.5232144.0_A.pdf

        BR,
        Bill

        Show
        William Fausser added a comment - Hi Eric, I'm retesting : The file/home/fausser/paed_live.2.8.cv.60091.5232144.0_A.pdf is not valid, error(s) : 2.4.3 : Invalid Color space, DestOutputProfile is missing 2.4.3 : Invalid Color space, DestOutputProfile is missing 2.4.3 : Invalid Color space, DestOutputProfile is missing 2.4.3 : Invalid Color space, DestOutputProfile is missing 2.4.3 : Invalid Color space, DestOutputProfile is missing 2.4.3 : Invalid Color space, DestOutputProfile is missing 7.3 : Error on MetaData, Cannot find a definition for the namespace 'http://ns.adobe.com/xap/1.0/sType/ResourceEvent#' I'm using : java -jar /home/fausser/preflight-1.8.0-20120715.180423-19-jar-with-dependencies.jar /home/fausser/paed_live.2.8.cv.60091.5232144.0_A.pdf BR, Bill
        Hide
        Eric Leleu added a comment -

        Hi,

        FYI, I have uploaded the first version of the new Preflight implementation (PDFBOX-1312). This implementation fixes the ColorSpace issue for the document "paed_live.2.8.cv.60091.5232144.0_A.pdf".

        The XMP issue is still present for the moment.

        BR,
        Eric

        Show
        Eric Leleu added a comment - Hi, FYI, I have uploaded the first version of the new Preflight implementation ( PDFBOX-1312 ). This implementation fixes the ColorSpace issue for the document "paed_live.2.8.cv.60091.5232144.0_A.pdf". The XMP issue is still present for the moment. BR, Eric
        Hide
        William Fausser added a comment -

        Hi Eric,

        Thanks for the info.

        Regards,
        Bill

        Show
        William Fausser added a comment - Hi Eric, Thanks for the info. Regards, Bill
        Hide
        Eric Leleu added a comment -

        Hi,

        FYI, I was offline the last 3 weeks, I has just started to work on this refactoring.
        This fix will probably not included in the PDFBox 1.7.0 release.

        A task has been opened to follow this refactoring. (PDFBox-1312)

        BR,
        Eric

        Show
        Eric Leleu added a comment - Hi, FYI, I was offline the last 3 weeks, I has just started to work on this refactoring. This fix will probably not included in the PDFBox 1.7.0 release. A task has been opened to follow this refactoring. (PDFBox-1312) BR, Eric
        Hide
        Eric Leleu added a comment -

        Hi,

        A fix for the file "kun_muutat_suomeenEN.pdf" was committed (revision 1327281).
        Alternate CS isn't check anymore in the ICCBased CS.

        For the PDF File "paed_live.2.8.cv.60091.5232144.0_A.pdf", the fix isn't so easy. I need to refactor some preflight piece of code... It is something I have to do since a long time but I never take the time to do it... And the inevitable happened...

        BR,
        Eric

        Show
        Eric Leleu added a comment - Hi, A fix for the file "kun_muutat_suomeenEN.pdf" was committed (revision 1327281). Alternate CS isn't check anymore in the ICCBased CS. For the PDF File "paed_live.2.8.cv.60091.5232144.0_A.pdf", the fix isn't so easy. I need to refactor some preflight piece of code... It is something I have to do since a long time but I never take the time to do it... And the inevitable happened... BR, Eric
        Hide
        William Fausser added a comment - - edited

        Hi Eric,

        It seems like the control is useless on the kun_muutat_suomeenEN.pdf.pdf since the Device Gray/ICC based color space seems not to require a
        hard coded DestOutputProfile. Might be that if the DestOutputProfile is missing and you have an ICC base color space, then it is OK. I'm sorry
        I do not have the iso to refer to.

        BR,
        Bill

        Show
        William Fausser added a comment - - edited Hi Eric, It seems like the control is useless on the kun_muutat_suomeenEN.pdf.pdf since the Device Gray/ICC based color space seems not to require a hard coded DestOutputProfile. Might be that if the DestOutputProfile is missing and you have an ICC base color space, then it is OK. I'm sorry I do not have the iso to refer to. BR, Bill
        Hide
        Eric Leleu added a comment -

        Hi,

        I had quickly look at the two PDFs.

        The file "kun_muutat_suomeenEN.pdf.pdf" hasn't succeed may be due to the ICCBased ColorSpace that uses a DeviceRGB colorspace as Alternate colorspace (Uses if the Colorspace described in the ICC Stream isn't supported). But this control is may be useless, what is your point of view about it?

        For the second file, there are probably a bug in the ColorSpace validation. The ColorSpace used by XObject is DeviceGray that expects a DestOutputProfile because the DeviceGray isn't device independent. However, there are a DefaultGray elements in the file that references a ICCBased element. So may be the DeviceGray should use the DefaultGray colorspace...

        An other reading of the PDF Reference document will be useful to fix this issue !

        BR,
        Eric

        Show
        Eric Leleu added a comment - Hi, I had quickly look at the two PDFs. The file "kun_muutat_suomeenEN.pdf.pdf" hasn't succeed may be due to the ICCBased ColorSpace that uses a DeviceRGB colorspace as Alternate colorspace (Uses if the Colorspace described in the ICC Stream isn't supported). But this control is may be useless, what is your point of view about it? For the second file, there are probably a bug in the ColorSpace validation. The ColorSpace used by XObject is DeviceGray that expects a DestOutputProfile because the DeviceGray isn't device independent. However, there are a DefaultGray elements in the file that references a ICCBased element. So may be the DeviceGray should use the DefaultGray colorspace... An other reading of the PDF Reference document will be useful to fix this issue ! BR, Eric
        Hide
        William Fausser added a comment -

        Hi Guillaume,

        I did not have an answer right away, so I sent you question to Leonard Rosenthol.
        Here is his response:

        "There is no reason to change the version in the header as the version can be anything (ISO 19005-2:2005, 6.1.2).

        As for the OutputIntent, that is not necessary if all colors in the PDF are in a device independent colorspace (ISO 19005-1:2005, 6.2.3.1). In this case, they are all in ICCBased Gray.

        Leonard"

        BR,
        Bill Fausser

        Show
        William Fausser added a comment - Hi Guillaume, I did not have an answer right away, so I sent you question to Leonard Rosenthol. Here is his response: "There is no reason to change the version in the header as the version can be anything (ISO 19005-2:2005, 6.1.2). As for the OutputIntent, that is not necessary if all colors in the PDF are in a device independent colorspace (ISO 19005-1:2005, 6.2.3.1). In this case, they are all in ICCBased Gray. Leonard" BR, Bill Fausser
        Hide
        Guillaume Bailleul added a comment -

        Preflight current version is based on ISO 19005 and I understand that version accepts PDF 1.4 and further, but I am not sure of my english, can you validate that point in the specification ?

        If 19005-2 allows older versions of PDF, it can be a reason. Reading PDF Reference third edition (defining PDF 1.4), I found DestOutputProfile was something new in that version. That's why they are not present in olders pdf. in ISO 19005, DestOutputProfile is mandatory.

        In the xmp block of paed, the value of pdfaid:part is 1 (for part 1 of the specification), so, in my opinion when doc converter 10 changed the pdf to pdf/a it did not change the PDF header and did not change anything in color spaces.

        Show
        Guillaume Bailleul added a comment - Preflight current version is based on ISO 19005 and I understand that version accepts PDF 1.4 and further, but I am not sure of my english, can you validate that point in the specification ? If 19005-2 allows older versions of PDF, it can be a reason. Reading PDF Reference third edition (defining PDF 1.4), I found DestOutputProfile was something new in that version. That's why they are not present in olders pdf. in ISO 19005, DestOutputProfile is mandatory. In the xmp block of paed, the value of pdfaid:part is 1 (for part 1 of the specification), so, in my opinion when doc converter 10 changed the pdf to pdf/a it did not change the PDF header and did not change anything in color spaces.
        Hide
        William Fausser added a comment -

        Hi Guillaume,

        I think the version number is a thing of the past and not just nailed down to version 1.4.

        PDF/A ISO 19005 was originally derived from Adobe reference 1.4
        PDF/A ISO 19005-2 is a current standard (about a year old) and is based on ISO 32000 which is the current up to date PDF Standard.

        So the 1.4 thing goes away now that it is based on the most up to date copy.

        BR,
        Bill

        Show
        William Fausser added a comment - Hi Guillaume, I think the version number is a thing of the past and not just nailed down to version 1.4. PDF/A ISO 19005 was originally derived from Adobe reference 1.4 PDF/A ISO 19005-2 is a current standard (about a year old) and is based on ISO 32000 which is the current up to date PDF Standard. So the 1.4 thing goes away now that it is based on the most up to date copy. BR, Bill
        Hide
        William Fausser added a comment -

        Hi Guillaume,

        Yes, apparently. These documents were converted with Adobe's ADEP PDF Generator service which is a fancy name for LIveCycle. I can check with Leonard Rosenthal form Adobe--for a better answer, if you would like.

        BR,
        Bill

        Show
        William Fausser added a comment - Hi Guillaume, Yes, apparently. These documents were converted with Adobe's ADEP PDF Generator service which is a fancy name for LIveCycle. I can check with Leonard Rosenthal form Adobe--for a better answer, if you would like. BR, Bill
        Hide
        Guillaume Bailleul added a comment -

        kun_muutat_suomeenEN.pdf.pdf is a pdf 1.3 file and paed_live.2.8.cv.60091.5232144.0_A.pdf a pdf 1.2 file.
        Can they be valid PDF/A ?

        Show
        Guillaume Bailleul added a comment - kun_muutat_suomeenEN.pdf.pdf is a pdf 1.3 file and paed_live.2.8.cv.60091.5232144.0_A.pdf a pdf 1.2 file. Can they be valid PDF/A ?
        Hide
        William Fausser added a comment -

        Hi Eric,
        Here is another attachment with similar problem:
        paed_live.2.8.cv.60091.5232144.0_A.pdf is not valid, error(s):
        2.4.3: Invalid Color space, DestOutputProfile is missing
        2.4.3: Invalid Color space, DestOutputProfile is missing
        2.4.3: Invalid Color space, DestOutputProfile is missing
        2.4.3: Invalid Color space, DestOutputProfile is missing
        2.4.3: Invalid Color space, DestOutputProfile is missing
        2.4.3:| Invalid Color space, DestOutputProfile is missing
        7.3:| Error on MetaData, Cannot find a definition for the namespace 'http://ns.adobe.com/xap/1.0/sType/ResourceEvent#'

        Show
        William Fausser added a comment - Hi Eric, Here is another attachment with similar problem: paed_live.2.8.cv.60091.5232144.0_A.pdf is not valid, error(s): 2.4.3: Invalid Color space, DestOutputProfile is missing 2.4.3: Invalid Color space, DestOutputProfile is missing 2.4.3: Invalid Color space, DestOutputProfile is missing 2.4.3: Invalid Color space, DestOutputProfile is missing 2.4.3: Invalid Color space, DestOutputProfile is missing 2.4.3:| Invalid Color space, DestOutputProfile is missing 7.3:| Error on MetaData, Cannot find a definition for the namespace 'http://ns.adobe.com/xap/1.0/sType/ResourceEvent#'

          People

          • Assignee:
            Eric Leleu
            Reporter:
            William Fausser
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development