DynaPDF.SetOpacity
------------------

Sets the opacity value which is used to render the appearance of a text annotation.

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

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

**MBS**( **"DynaPDF.SetOpacity";** /\* Sets the opacity value which is used to render the appearance of a text annotation. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Value**) /\* The new value. 1.0 = opaque, 0.0 = invisible.e.g. 0.5 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Value | The new value. 1.0 = opaque, 0.0 = invisible. | 0.5 |

### Result

Returns OK or error.

### Description

Sets the opacity value which is used to render the appearance of a text annotation.   
The parameter Value must be in the range 0.0 to 1.0. If Value is zero the annotation is invisible, if Value is 1.0, the annotation is completely opaque.  
At time of publication the opacity property is used for text annotations only. Later versions of DynaPDF use this property may be for other PDF objects too.  
Default value = 1.0  
See also [SetOpacity](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetOpacity.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.GetOpacity](DynaPDFGetOpacity.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetAnnotOpacity](DynaPDFSetAnnotOpacity.md)
- [DynaPDF.SetLeading](DynaPDFSetLeading.md)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[DynaPDF.SetOCGState](DynaPDFSetOCGState.md) - [DynaPDF.SetOrientation](DynaPDFSetOrientation.md)

[HTML Version](DynaPDFSetOpacity.shtml)