ICCBasedColorSpace Constructor (String, Byte)

Apitron PDF Kit help
Apitron.PDF.Kit library for .NET
Initializes a new instance of the ColorSpace class.

Namespace:  Apitron.PDF.Kit.FixedLayout.Resources.ColorSpaces.CIEBased
Assembly:  Apitron.PDF.Kit (in Apitron.PDF.Kit.dll) Version: 2.0.37.0 (2.0.37.0)
Syntax

public ICCBasedColorSpace(
	string resourceID,
	byte[] iccProfileData
)

Parameters

resourceID
Type: SystemString
The id.
iccProfileData
Type: SystemByte
The icc profile data.
Examples

C#
byte[] iccProfileData;

// read data from ICC profile
using (FileStream iccProfile = new FileStream("YOUR_FILE.icm", FileMode.Open, FileAccess.Read))
{
    iccProfileData = new byte[iccProfile.Length];
    using (BinaryReader reader = new BinaryReader(iccProfile))
    {
        reader.Read(iccProfileData, 0, iccProfileData.Length);
    }
}

// register ICCBased color space as a resource
document.ResourceManager.RegisterResource(new ICCBasedColorSpace("CS_ICCBased", iccProfileData));

// set color space
page.Content.SetNonStrokingColorSpace("CS_ICCBased");
page.Content.SetStrokingColorSpace("CS_ICCBased");

// set color
page.Content.SetNonStrokingColor(0.0, 0.6, 0.3);
page.Content.SetStrokingColor(0.3, 0.6, 0.0);
See Also

Reference