org.pdfbox.pdmodel.graphics.color
Class PDColorSpaceFactory

java.lang.Object
  extended byorg.pdfbox.pdmodel.graphics.color.PDColorSpaceFactory

public final class PDColorSpaceFactory
extends Object

This class represents a color space in a pdf document.

Version:
$Revision: 1.11 $
Author:
Ben Litchfield

Method Summary
static PDColorSpace createColorSpace(COSBase colorSpace)
          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.
static PDColorSpace createColorSpace(String colorSpaceName)
          This will create the correct color space given the name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createColorSpace

public static PDColorSpace createColorSpace(COSBase colorSpace)
                                     throws IOException
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(String colorSpaceName)
                                     throws IOException
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(PDDocument doc,
                                            ColorSpace cs)
                                     throws 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:
IOException - If the color space name is unknown.