Top Description Fields Constructors Methods
org.apache.pdfbox.preflight.graphic

public Class ICCProfileWrapper

extends Object
Class Inheritance
Imports
java.awt.color.ColorSpace, .ICC_ColorSpace, .ICC_Profile, java.io.IOException, .InputStream, org.apache.pdfbox.cos.COSArray, .COSBase, .COSDictionary, .COSName, .COSStream, org.apache.pdfbox.pdmodel.PDDocumentCatalog, org.apache.pdfbox.preflight.PreflightContext, .PreflightDocument, .ValidationResult.ValidationError, org.apache.pdfbox.preflight.exception.ValidationException

This class embeds an instance of java.awt.color.ICC_Profile which represent the ICCProfile defined by the DestOutputItents key of the OutputIntents of the PDF.

Field Summary

Modifier and TypeField and Description
private final ICC_ColorSpace
colorSpace

The ICC ColorSpace created using the ICCProfile

private final ICC_Profile
profile

The ICCProfile extracted from DestOutputItents

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the color space type.
getColorSpaceType
()

Call the ICC_ColorSpace.getType method and return the value.

public static ICCProfileWrapper
public ICC_Profile

Returns:

the profile
getProfile
()

public boolean

Returns:

true if the ColourSpace is CMYK.
isCMYKColorSpace
()

Return true if the ColourSpace is CMYK

public boolean

Returns:

true if the ColourSpace is gray scale.
isGrayColorSpace
()

Return true if the ColourSpace is Gray scale

public boolean

Returns:

true if the ColourSpace is RGB.
isRGBColorSpace
()

Return true if the ColourSpace is RGB

private static ICCProfileWrapper

Returns:

an instance of ICCProfileWrapper or null if there are no DestOutputProfile
searchFirstICCProfile
(PreflightContext context)

This method read all outputIntent dictionary until on of them have a destOutputProfile stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

colorSpaceback to summary
private final ICC_ColorSpace colorSpace

The ICC ColorSpace created using the ICCProfile

profileback to summary
private final ICC_Profile profile

The ICCProfile extracted from DestOutputItents

Constructor Detail

ICCProfileWrapperback to summary
public ICCProfileWrapper(final ICC_Profile _profile)

Method Detail

getColorSpaceTypeback to summary
public int getColorSpaceType()

Call the ICC_ColorSpace.getType method and return the value.

Returns:int

the color space type.

getOrSearchICCProfileback to summary
public static ICCProfileWrapper getOrSearchICCProfile(PreflightContext context) throws ValidationException
getProfileback to summary
public ICC_Profile getProfile()
Returns:ICC_Profile

the profile

isCMYKColorSpaceback to summary
public boolean isCMYKColorSpace()

Return true if the ColourSpace is CMYK

Returns:boolean

true if the ColourSpace is CMYK.

isGrayColorSpaceback to summary
public boolean isGrayColorSpace()

Return true if the ColourSpace is Gray scale

Returns:boolean

true if the ColourSpace is gray scale.

isRGBColorSpaceback to summary
public boolean isRGBColorSpace()

Return true if the ColourSpace is RGB

Returns:boolean

true if the ColourSpace is RGB.

searchFirstICCProfileback to summary
private static ICCProfileWrapper searchFirstICCProfile(PreflightContext context)

This method read all outputIntent dictionary until on of them have a destOutputProfile stream. This stream is parsed and is used to create a IccProfileWrapper.

Returns:ICCProfileWrapper

an instance of ICCProfileWrapper or null if there are no DestOutputProfile