DynaPDF.SetExtColorSpace
------------------------

Activates an extended color space in the graphics state.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [7.4](newinversion74.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.SetExtColorSpace"; PDF; Handle ) 

**MBS**( **"DynaPDF.SetExtColorSpace";** /\* Activates an extended color space in the graphics state. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Handle**) /\* Handle of an extended color space. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Handle | Handle of an extended color space. |  |

### Result

Returns OK or error.

### Description

Activates an extended color space in the graphics state.   
An extended color spaces are non-device color spaces, such as ICCBased, Lab, Separation, DeviceN, and so on. The current fill and stroke color are initialised to black after the color space has been changed. Device color spaces can be set with [DynaPDF.SetColorSpace](DynaPDFSetColorSpace.md). The fill and stroke color spaces can also be set separately with [DynaPDF.SetExtFillColorSpace](DynaPDFSetExtFillColorSpace.md) and [DynaPDF.SetExtStrokeColorSpace](DynaPDFSetExtStrokeColorSpace.md).  
  
Requires DynaPDF Pro license.  
See also [SetExtColorSpace](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetExtColorSpace.shtml) function in DynaPDF manual.

### Examples

Draw line in a separation color:

 # draw line in Cut Color   
Set Variable \[ $cs ; Value: MBS ("[DynaPDF.CreateSeparationCS](DynaPDFCreateSeparationCS.md)"; $pdf ; "Through Cut"; "DeviceCMYK"; -1; MBS ("[DynaPDF.CMYK](DynaPDFCMYK.md)"; 0; 255; 0; 0)) \]   
Set Variable \[ $r ; Value: MBS ("DynaPDF.SetExtColorSpace"; $pdf ; $cs ) \]   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.SetFillColor](DynaPDFSetFillColor.md)"; $pdf ; 1) \]   
Set Variable \[ $r ; Value: MBS ( "[DynaPDF.Rectangle](DynaPDFRectangle.md)"; $pdf ; $x ; $y ; $w ; $h ; "Stroke" ) \]  
### See also

- [DynaPDF.AddDeviceNSeparations](DynaPDFAddDeviceNSeparations.md)
- [DynaPDF.CMYK](DynaPDFCMYK.md)
- [DynaPDF.CreateICCBasedColorSpace](DynaPDFCreateICCBasedColorSpace.md)
- [DynaPDF.CreateICCBasedColorSpaceContainer](DynaPDFCreateICCBasedColorSpaceContainer.md)
- [DynaPDF.CreateSeparationCS](DynaPDFCreateSeparationCS.md)
- [DynaPDF.GetColorSpace](DynaPDFGetColorSpace.md)
- [DynaPDF.Initialize](DynaPDFInitialize.md)
- [DynaPDF.SetColorSpace](DynaPDFSetColorSpace.md)
- [DynaPDF.SetExtFillColorSpace](DynaPDFSetExtFillColorSpace.md)
- [DynaPDF.SetExtStrokeColorSpace](DynaPDFSetExtStrokeColorSpace.md)

### Release notes

- **Version 7.4**
    - Added [DynaPDF.AddDeviceNProcessColorants](http://www.mbsplugins.eu/DynaPDFAddDeviceNProcessColorants.shtml), [DynaPDF.AddDeviceNSeparations](http://www.mbsplugins.eu/DynaPDFAddDeviceNSeparations.shtml), [DynaPDF.CreateDeviceNColorSpace](http://www.mbsplugins.eu/DynaPDFCreateDeviceNColorSpace.shtml), [DynaPDF.CreateSeparationCS](http://www.mbsplugins.eu/DynaPDFCreateSeparationCS.shtml), [DynaPDF.SetExtColorSpace](http://www.mbsplugins.eu/DynaPDFSetExtColorSpace.shtml), [DynaPDF.SetExtFillColorSpace](http://www.mbsplugins.eu/DynaPDFSetExtFillColorSpace.shtml), [DynaPDF.SetExtStrokeColorSpace](http://www.mbsplugins.eu/DynaPDFSetExtStrokeColorSpace.shtml) and [DynaPDF.SetSeparationInfo](http://www.mbsplugins.eu/DynaPDFSetSeparationInfo.shtml) functions.

### Example Databases

- [DynaPDF/Create DeviceN ColorSpace](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Create%20DeviceN%20ColorSpace.shtml#2ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 7.4pr4](https://www.mbsplugins.de/archive/2017-08-31/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 27th August 2017 , last changed 11st November 2018

  
[DynaPDF.SetDrawDirection](DynaPDFSetDrawDirection.md) - [DynaPDF.SetExtFillColorSpace](DynaPDFSetExtFillColorSpace.md)

[HTML Version](DynaPDFSetExtColorSpace.shtml)