DynaPDF.SetAnnotSubject
-----------------------

Sets or changes the optional subject string of an annotation.

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

MBS( "DynaPDF.SetAnnotSubject"; PDF; AnnotationHandle; Subject ) 

**MBS**( **"DynaPDF.SetAnnotSubject";** /\* Sets or changes the optional subject string of an annotation. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$AnnotationHandle**; /\* The annotation index.e.g. 5 \*/   
**$Subject**) /\* The subject to be set.e.g. "Hello World" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| AnnotationHandle | The annotation index. | 5 |
| Subject | The subject to be set. | "Hello World" |

### Result

Returns OK or error.

### Description

Sets or changes the optional subject string of an annotation.   
The subject is defined since PDF 1.5. The function adjusts the PDF version automatically if it is lower than PDF 1.5.  
The annotation types FileLink, PageLink, PopUp and WebLink do not support a subject string. The function returns with an error when trying to set the subject on these annotation types.  
If the parameter Value an empty string the subject string is deleted in the annotation.  
See also [SetAnnotSubject](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetAnnotSubject.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetAnnotString](DynaPDFSetAnnotString.md)

This function checks for a license.

Created 25th November 2014 , last changed 25th November 2014

  
[DynaPDF.SetAnnotString](DynaPDFSetAnnotString.md) - [DynaPDF.SetBBox](DynaPDFSetBBox.md)

[HTML Version](DynaPDFSetAnnotSubject.shtml)