DynaPDF.GetAnnotCount
---------------------

Returns the number of annotations currently used in 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.GetAnnotCount"; PDF ) 

**MBS**( **"DynaPDF.GetAnnotCount";** /\* Returns the number of annotations currently used in the document. \*/  
**$PDF**) /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |

### Result

Returns number or error.

### Description

Returns the number of annotations currently used in the document.   
Note: This value includes also annotations which were deleted by [DynaPDF.DeleteAnnotation](DynaPDFDeleteAnnotation.md) because annotations are not physically deleted at runtime. This value can be used to loop over all annotations. Annotation handles are simple array indexes.  
  
See also [GetAnnotCount](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetAnnotCount.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.GetActionCount](DynaPDFGetActionCount.md)
- [DynaPDF.GetAnnotColor](DynaPDFGetAnnotColor.md)
- [DynaPDF.GetFontCount](DynaPDFGetFontCount.md)
- [DynaPDF.GetPageAnnotCount](DynaPDFGetPageAnnotCount.md)
- [DynaPDF.GetPageCount](DynaPDFGetPageCount.md)
- [DynaPDF.GetTemplCount](DynaPDFGetTemplCount.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetAnnotFlags](DynaPDFSetAnnotFlags.md)
- [DynaPDF.SetAnnotIcon](DynaPDFSetAnnotIcon.md)
- [DynaPDF.SetAnnotString](DynaPDFSetAnnotString.md)

### Example Databases

- [DynaPDF/Extract Attachments](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Extract%20Attachments.shtml#2ScriptAnchor_)
- [DynaPDF/List Annotations](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/List%20Annotations.shtml#2ScriptAnchor_)

This function checks for a license.

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

  
[DynaPDF.GetAnnotColor](DynaPDFGetAnnotColor.md) - [DynaPDF.GetAnnotFlags](DynaPDFGetAnnotFlags.md)

[HTML Version](DynaPDFGetAnnotCount.shtml)