Package com.pdftools.toolbox.pdf.content
Class IccBasedColorSpace
- java.lang.Object
-
- com.pdftools.toolbox.internal.NativeBase
-
- com.pdftools.toolbox.internal.NativeObject
-
- com.pdftools.toolbox.pdf.content.ColorSpace
-
- com.pdftools.toolbox.pdf.content.IccBasedColorSpace
-
public class IccBasedColorSpace extends ColorSpace
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IccBasedColorSpacecopy(Document targetDocument, IccBasedColorSpace colorSpace)Copy an ICC-based color spacestatic IccBasedColorSpacecreate(Document targetDocument, Stream profile)Create an new ICC-based color space from an ICC color profile.-
Methods inherited from class com.pdftools.toolbox.pdf.content.ColorSpace
copy, createProcessColorSpace, getComponentCount
-
Methods inherited from class com.pdftools.toolbox.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 thetargetDocumentargument has already been closedjava.lang.IllegalArgumentException- if thetargetDocumentargument is read-onlyjava.lang.IllegalArgumentException- if theprofileargument isnulljava.lang.IllegalArgumentException- iftargetDocumentisnulljava.lang.IllegalArgumentException- ifprofileisnull
-
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 thetargetDocumentargument has already been closedjava.lang.IllegalArgumentException- if thetargetDocumentargument is read-onlyjava.lang.IllegalArgumentException- if thecolorSpaceobject is not associated with an input documentjava.lang.IllegalArgumentException- if the document associated withcolorSpacehas already been closedjava.lang.IllegalArgumentException- iftargetDocumentisnulljava.lang.IllegalArgumentException- ifcolorSpaceisnull
-
-