Class PDColorSpaceFactory
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.color.PDColorSpaceFactory
This class represents a color space in a pdf document.
- Version:
- $Revision: 1.11 $
- Author:
- Ben Litchfield
-
Method Summary
Modifier and TypeMethodDescriptionstatic PDColorSpace
createColorSpace
(String colorSpaceName) This will create the correct color space given the name.static PDColorSpace
createColorSpace
(String colorSpaceName, Map<String, PDColorSpace> colorSpaces) This will create the correct color space given the name.static PDColorSpace
createColorSpace
(COSBase colorSpace) This will create the correct color space given the name.static PDColorSpace
createColorSpace
(COSBase colorSpace, Map<String, PDColorSpace> colorSpaces) This will create the correct color space given the name.static PDColorSpace
createColorSpace
(COSBase colorSpace, Map<String, PDColorSpace> colorSpaces, Map<String, PDPatternResources> patterns) This will create the correct color space given the name.static PDColorSpace
createColorSpace
(PDDocument doc, ColorSpace cs) This will create the correct color space from a java colorspace.
-
Method Details
-
createColorSpace
This will create the correct color space given the name.- Parameters:
colorSpace
- The color space object.- Returns:
- The color space.
- Throws:
IOException
- If the color space name is unknown.
-
createColorSpace
public static PDColorSpace createColorSpace(COSBase colorSpace, Map<String, PDColorSpace> colorSpaces) throws IOExceptionThis 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:
IOException
- If the color space name is unknown.
-
createColorSpace
public static PDColorSpace createColorSpace(COSBase colorSpace, Map<String, PDColorSpace> colorSpaces, Map<String, throws IOExceptionPDPatternResources> patterns) 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:
IOException
- If the color space name is unknown.
-
createColorSpace
This will create the correct color space given the name.- Parameters:
colorSpaceName
- The name of the colorspace.- Returns:
- The color space.
- Throws:
IOException
- If the color space name is unknown.
-
createColorSpace
public static PDColorSpace createColorSpace(String colorSpaceName, Map<String, PDColorSpace> colorSpaces) throws IOExceptionThis 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:
IOException
- If the color space name is unknown.
-
createColorSpace
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:
IOException
- If the color space name is unknown.
-