DynaPDF.SetTrapped
------------------

Sets the trapped key of the document.

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

MBS( "DynaPDF.SetTrapped"; PDF; Value ) 

**MBS**( **"DynaPDF.SetTrapped";** /\* Sets the trapped key of the document. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Value**) /\* 1 or 0 to enable or disable.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Value | 1 or 0 to enable or disable. | 1 |

### Result

Returns OK or error.

### Description

Sets the trapped key of the document.   
Trapping is a technique to avoid unwanted visual artifacts such as brightly colored gaps or bands around the edges of printed objects. In high- quality reproduction of color documents, such artifacts are commonly avoided by creating an overlap, called a trap, between areas of adjacent color.   
The trapped key determines whether the document was trapped. The default value is unknown that means no value is written to the file. The trapped key should be set if possible.   
See also [SetTrapped](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetTrapped.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.GetInIsTrapped](DynaPDFGetInIsTrapped.md)
- [DynaPDF.GetTabLen](DynaPDFGetTabLen.md)
- [DynaPDF.GetTrapped](DynaPDFGetTrapped.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetCMapDir](DynaPDFSetCMapDir.md)
- [DynaPDF.SetTabLen](DynaPDFSetTabLen.md)

This function checks for a license.

Created 6th February 2015 , last changed 6th February 2015

  
[DynaPDF.SetTransparentColor](DynaPDFSetTransparentColor.md) - [DynaPDF.SetUseExactPwd](DynaPDFSetUseExactPwd.md)

[HTML Version](DynaPDFSetTrapped.shtml)