DynaPDF.TextAnnot
-----------------

Creates a text annotation.

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

MBS( "DynaPDF.TextAnnot"; PDF; PosX; PosY; Width; Height; Author; Text; Icon; Open ) 

**MBS**( **"DynaPDF.TextAnnot";** /\* Creates a text annotation. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$PosX**; /\* X-Coordinate of the annotatione.g. 100 \*/   
**$PosY**; /\* Y-Coordinate of the annotatione.g. 100 \*/   
**$Width**; /\* Width of the window in open statee.g. 100 \*/   
**$Height**; /\* Height of the window in open statee.g. 100 \*/   
**$Author**; /\* The author name. Can be empty.e.g. "Christian Schmitz" \*/   
**$Text**; /\* The text for the annotation.e.g. "Hello World" \*/   
**$Icon**; /\* Which icon to use.   
Can be Help, Insert, Key, NewParagraph, Note, Paragraph or UserDefined.e.g. "Help" \*/   
**$Open**) /\* Should the annotation appear open or closed? Pass 1 for open or 0 for close.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| PosX | X-Coordinate of the annotation | 100 |
| PosY | Y-Coordinate of the annotation | 100 |
| Width | Width of the window in open state | 100 |
| Height | Height of the window in open state | 100 |
| Author | The author name. Can be empty. | "Christian Schmitz" |
| Text | The text for the annotation. | "Hello World" |
| Icon | Which icon to use.    Can be Help, Insert, Key, NewParagraph, Note, Paragraph or UserDefined. | "Help" |
| Open | Should the annotation appear open or closed? Pass 1 for open or 0 for close. | 1 |

### Result

Returns annotation handle or error.

### Description

Creates a text annotation.   
The parameters Width and Height define the size of the annotation's window. The window is shown in the open state of the annotation.  
If the parameter Open is true, the annotation appears in its open state when opening the document. If the annotation is closed, the annotation's icon appears on screen.  
The parameters Author and Text are optional, they can be empty. DynaPDF does not embed the annotation icon. However, since Acrobat 5 they are available in Adobe's Acrobat or Reader.  
See also [TextAnnot](https://www.monkeybreadsoftware.com/DynaPDF-Manual/TextAnnot.shtml) function in DynaPDF manual.

### Examples

Add text annotation:

 Set Variable \[ $r ; Value: MBS ( "DynaPDF.TextAnnot"; $pdf ; 50; 50; 300; 200; "Christian Schmitz"; "Hello World"; "Help"; 1) \]  
### See also

- [DynaPDF.FreeTextAnnot](DynaPDFFreeTextAnnot.md)
- [DynaPDF.LineAnnot](DynaPDFLineAnnot.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.ResetAnnotAP](DynaPDFResetAnnotAP.md)
- [DynaPDF.SetAnnotIcon](DynaPDFSetAnnotIcon.md)
- [DynaPDF.StampAnnot](DynaPDFStampAnnot.md)

### Blog Entries

- [Unlocking the Power of PDFs in FileMaker with DynaPDF and the MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2024-09-16/Unlocking_the_Power_of_PDFs_in/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 28th November 2014 , last changed 3th October 2024

  
[DynaPDF.TestWriteText](DynaPDFTestWriteText.md) - [DynaPDF.TranslateCoords](DynaPDFTranslateCoords.md)

[HTML Version](DynaPDFTextAnnot.shtml)