Class PDColorSpaceFactory
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.graphics.color.PDColorSpaceFactory
-
public final class PDColorSpaceFactory extends java.lang.ObjectThis class represents a color space in a pdf document.- Version:
- $Revision: 1.11 $
- Author:
- Ben Litchfield
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PDColorSpacecreateColorSpace(java.lang.String colorSpaceName)This will create the correct color space given the name.static PDColorSpacecreateColorSpace(java.lang.String colorSpaceName, java.util.Map<java.lang.String,PDColorSpace> colorSpaces)This will create the correct color space given the name.static PDColorSpacecreateColorSpace(COSBase colorSpace)This will create the correct color space given the name.static PDColorSpacecreateColorSpace(COSBase colorSpace, java.util.Map<java.lang.String,PDColorSpace> colorSpaces)This will create the correct color space given the name.static PDColorSpacecreateColorSpace(COSBase colorSpace, java.util.Map<java.lang.String,PDColorSpace> colorSpaces, java.util.Map<java.lang.String,PDPatternResources> patterns)This will create the correct color space given the name.static PDColorSpacecreateColorSpace(PDDocument doc, java.awt.color.ColorSpace cs)This will create the correct color space from a java colorspace.
-
-
-
Method Detail
-
createColorSpace
public static PDColorSpace createColorSpace(COSBase colorSpace) throws java.io.IOException
This will create the correct color space given the name.- Parameters:
colorSpace- The color space object.- Returns:
- The color space.
- Throws:
java.io.IOException- If the color space name is unknown.
-
createColorSpace
public static PDColorSpace createColorSpace(COSBase colorSpace, java.util.Map<java.lang.String,PDColorSpace> colorSpaces) throws java.io.IOException
This will create the correct color space given the name.- Parameters:
colorSpace- The color space object.colorSpaces- The ColorSpace dictionary from the current resources, if any.- Returns:
- The color space.
- Throws:
java.io.IOException- If the color space name is unknown.
-
createColorSpace
public static PDColorSpace createColorSpace(COSBase colorSpace, java.util.Map<java.lang.String,PDColorSpace> colorSpaces, java.util.Map<java.lang.String,PDPatternResources> patterns) throws java.io.IOException
This will create the correct color space given the name.- Parameters:
colorSpace- The color space object.colorSpaces- The ColorSpace dictionary from the current resources, if any.patterns- The patterns dictionary from the current resources, if any- Returns:
- The color space.
- Throws:
java.io.IOException- If the color space name is unknown.
-
createColorSpace
public static PDColorSpace createColorSpace(java.lang.String colorSpaceName) throws java.io.IOException
This will create the correct color space given the name.- Parameters:
colorSpaceName- The name of the colorspace.- Returns:
- The color space.
- Throws:
java.io.IOException- If the color space name is unknown.
-
createColorSpace
public static PDColorSpace createColorSpace(java.lang.String colorSpaceName, java.util.Map<java.lang.String,PDColorSpace> colorSpaces) throws java.io.IOException
This will create the correct color space given the name.- Parameters:
colorSpaceName- The name of the colorspace.colorSpaces- The ColorSpace dictionary from the current resources, if any.- Returns:
- The color space.
- Throws:
java.io.IOException- If the color space name is unknown.
-
createColorSpace
public static PDColorSpace createColorSpace(PDDocument doc, java.awt.color.ColorSpace cs) throws java.io.IOException
This will create the correct color space from a java colorspace.- Parameters:
doc- The doc to potentiall write information to.cs- The awt colorspace.- Returns:
- The color space.
- Throws:
java.io.IOException- If the color space name is unknown.
-
-