Click or drag to resize

PdfColorSpaceFromArray Method

Gets or creates a PdfColorSpace from the specified PdfArray whose first element is a PdfName object identifying the color space family. The remaining PdfArray elements, if any, are parameters that further characterize the color space; their number and types vary according to the particular PdfColorSpaceFamily.

Namespace: SautinSoft.Pdf.Content.Colors
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2025.3.13
Syntax
public static PdfColorSpace FromArray(
	PdfArray array
)

Parameters

array  PdfArray
A PdfArray whose first element is a PdfName object identifying the color space family. The remaining PdfArray elements, if any, are parameters that further characterize the color space; their number and types vary according to the particular PdfColorSpaceFamily.

Return Value

PdfColorSpace
An instance of a PdfColorSpace or .
Exceptions
ExceptionCondition
ArgumentNullExceptionarray is .
Remarks

If PdfColorSpace was already created from the same array, that PdfColorSpace instance is returned.

This method provides a way to create PdfColorSpaces that are currently not available in SautinSoft.Pdf (such as CalGray, CalRGB, Lab, ICCBased, Indexed, Separation, and DeviceN).

PdfColorSpaces available in SautinSoft.Pdf are accessible via DeviceGray, DeviceRGB, DeviceCMYK, and Pattern properties.

See Also