DynaPDF.SetReplaceICCProfileData
--------------------------------

Sets the replace ICC profile data.

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

MBS( "DynaPDF.SetReplaceICCProfileData"; PDF; ICCProfileType; ProfileData ) 

**MBS**( **"DynaPDF.SetReplaceICCProfileData";** /\* Sets the replace ICC profile data. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$ICCProfileType**; /\* The profile type. Can be Gray, RGB, CMYK or Lab.e.g. "Gray" \*/   
**$ProfileData**) /\* The container value with the profile data.e.g. MyTable::RGBProfile \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| ICCProfileType | The profile type. Can be Gray, RGB, CMYK or Lab. | "Gray" |
| ProfileData | The container value with the profile data. | MyTable::RGBProfile |

### Result

Returns OK or error.

### Description

Sets the replace ICC profile data.  
The plugin manages a list of replacement profiles which the DynaPDF library can query with the OnReplaceICCProfile callback. Needed for [DynaPDF.CheckConformance](DynaPDFCheckConformance.md).  
This function fills the list, so the plugin can return the right profile for the right type when needed.  
See also [SetReplaceICCProfileData](https://www.monkeybreadsoftware.com/DynaPDF-Manual/ReplaceICCProfileEx.shtml) function in DynaPDF manual.

### Examples

Set replacements for missing ICC profiles:

 Set Variable \[ $r ; Value: MBS ("DynaPDF.SetReplaceICCProfileData"; $pdf ; "rgb"; Create Text::RGB ICC Profile) \]   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.SetReplaceICCProfile](DynaPDFSetReplaceICCProfile.md)"; $pdf ; "gray"; Create Text::Gray ICC Profile) \]   
Set Variable \[ $r ; Value: MBS ("DynaPDF.SetReplaceICCProfileData"; $pdf ; "cmyk"; Create Text::CMYK ICC Profile) \]  
### See also

- [DynaPDF.CheckConformance](DynaPDFCheckConformance.md)
- [DynaPDF.GetReplaceICCProfile](DynaPDFGetReplaceICCProfile.md)
- [DynaPDF.GetReplaceICCProfileData](DynaPDFGetReplaceICCProfileData.md)
- [DynaPDF.GetReplaceICCProfilesCounter](DynaPDFGetReplaceICCProfilesCounter.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetReplaceICCProfile](DynaPDFSetReplaceICCProfile.md)

### Release notes

- **Version 10.5**
    - Fixed memory leak in [DynaPDF.SetReplaceICCProfileData](https://www.mbsplugins.eu/DynaPDFSetReplaceICCProfileData.shtml) function.
- **Version 7.5**
    - Added [DynaPDF.GetReplaceICCProfileData](http://www.mbsplugins.eu/DynaPDFGetReplaceICCProfileData.shtml) and [DynaPDF.SetReplaceICCProfileData](http://www.mbsplugins.eu/DynaPDFSetReplaceICCProfileData.shtml).

### Example Databases

- [DynaPDF/Convert to PDFA](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Convert%20to%20PDFA.shtml#1ScriptAnchor_)
- [DynaPDF/Create Text as PDFA](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Create%20Text%20as%20PDFA.shtml#2ScriptAnchor_)
- [DynaPDF/ZUGFeRD and Facture-X/ZUGFeRD Invoice](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/ZUGFeRD%20and%20Facture-X/ZUGFeRD%20Invoice.shtml#2ScriptAnchor_)
- [DynaPDF/ZUGFeRD and Facture-X/ZUGFeRD Rechnung erstellen](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/ZUGFeRD%20and%20Facture-X/ZUGFeRD%20Rechnung%20erstellen.shtml#9ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 10.5pr7](https://www.mbsplugins.de/archive/2020-11-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [FileMaker with ZUGFeRD 2.0 and Factur-X](https://www.mbsplugins.de/archive/2019-06-14/FileMaker_with_ZUGFeRD_20_and_/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 7.5pr1](https://www.mbsplugins.de/archive/2017-10-01/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 30th September 2017 , last changed 30th September 2017

  
[DynaPDF.SetReplaceICCProfile](DynaPDFSetReplaceICCProfile.md) - [DynaPDF.SetResolution](DynaPDFSetResolution.md)

[HTML Version](DynaPDFSetReplaceICCProfileData.shtml)