org.pdfbox.pdmodel.graphics.color

Class PDColorSpaceFactory


public final class PDColorSpaceFactory
extends java.lang.Object

This class represents a color space in a pdf document.
Version:
$Revision: 1.11 $
Author:
Ben Litchfield

Method Summary

static PDColorSpace
createColorSpace(String colorSpaceName)
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(PDDocument doc, ColorSpace cs)
This will create the correct color space from a java colorspace.

Method Details

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.

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.

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.