Class IccBasedColorSpace
- java.lang.Object
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeBase
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeObject
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.content.ColorSpace
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.content.IccBasedColorSpace
-
public class IccBasedColorSpace extends ColorSpace
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IccBasedColorSpace
copy(Document targetDocument, IccBasedColorSpace colorSpace)
Copy an ICC-based color spacestatic IccBasedColorSpace
create(Document targetDocument, Stream profile)
Create an new ICC-based color space from an ICC color profile.-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.pdf.content.ColorSpace
copy, createProcessColorSpace, getComponentCount
-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
create
public static IccBasedColorSpace create(Document targetDocument, Stream profile) throws java.io.IOException, UnknownFormatException, CorruptException
Create an new ICC-based color space from an ICC color profile.
The returned color space object is not yet used on any page, but it is associated with the given target document.- Parameters:
targetDocument
- the output document with which the returned object is associatedprofile
- the color profile data stream- Returns:
- newly created color profile object
- Throws:
java.io.IOException
- Error reading from the profile or writing to the documentUnknownFormatException
- The profile data has an unknown formatCorruptException
- The profile data is corruptjava.lang.IllegalArgumentException
- if thetargetDocument
argument has already been closedjava.lang.IllegalArgumentException
- if thetargetDocument
argument is read-onlyjava.lang.IllegalArgumentException
- if theprofile
argument isnull
java.lang.IllegalArgumentException
- iftargetDocument
isnull
java.lang.IllegalArgumentException
- ifprofile
isnull
-
copy
public static IccBasedColorSpace copy(Document targetDocument, IccBasedColorSpace colorSpace) throws java.io.IOException, CorruptException, ConformanceException
Copy an ICC-based color space
Copy an ICC-based color space object from an input document to the giventargetDocument
. The returned object is associated with the given target document but not yet part of it.- Parameters:
targetDocument
- the output document with which the returned object is associatedcolorSpace
- an ICC-based color space of a different document- Returns:
- the copied color space, associated with the current document.
- Throws:
java.io.IOException
- Error reading from the source document or writing to the target documentCorruptException
- The source document is corruptConformanceException
- The conformance level of the source document is not compatible with the conformance level of the target document.java.lang.IllegalArgumentException
- if thetargetDocument
argument has already been closedjava.lang.IllegalArgumentException
- if thetargetDocument
argument is read-onlyjava.lang.IllegalArgumentException
- if thecolorSpace
object is not associated with an input documentjava.lang.IllegalArgumentException
- if the document associated withcolorSpace
has already been closedjava.lang.IllegalArgumentException
- iftargetDocument
isnull
java.lang.IllegalArgumentException
- ifcolorSpace
isnull
-
-