Validation fails for inlined image if content stream for inline image specifies color space using abbreviated name (ex. /CMYK instead of /DeviceCMYK):
In this case Preflight validation fails with this message:
2.3.2 : Unexpected key in Graphic object definition, The ColorSpace is unknown
PDF Reference v1.4 Chapter 4.8.6 table 4.40 indicates the abbreviations for the names of color spaces, which could be used to represent color spaces for inlined images instead of using the full names. There abbreviation CMYK matches full name DeviceCMYK.
The culprit is that ContentStreamEngine looks for the corresponding ColorSpaces enum constant by matching its name to the specified color space name in content stream (i.e. using Enum.valueOf()). While ColorSpaces enum class has constants for abbreviated names, they are stored in local variable label and do not correspond to the enum constant name.