DynaPDF.GetGlyphIndex
---------------------

Returns the glyph index of the given code page or Unicode index.

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

MBS( "DynaPDF.GetGlyphIndex"; PDF; Index ) 

**MBS**( **"DynaPDF.GetGlyphIndex";** /\* Returns the glyph index of the given code page or Unicode index. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Index**) /\* The Code page, Unicode, or CJK index.e.g. 123 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Index | The Code page, Unicode, or CJK index. | 123 |

### Result

Returns number or error.

### Description

Returns the glyph index of the given code page or Unicode index.  
How Index must be defined depends on the code page with which the font was loaded. For example, if the font was loaded with a 8 bit code page, then indexes below 256 are treated as index into the code page table. Higher indexes are treated as Unicode value in this case. Note that all Unicode encoded glyphs of the font are accessible in this case, also if the font was loaded with a 8 bit code page!  
At time of publication the function does not support CJK code pages which require a conversion to Unicode, e.g. cpCJK\_Big5\_Uni, cpCJK\_EUC\_JP\_Uni, and so on.  
See also [GetGlyphIndex](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetGlyphIndex.shtml) function in DynaPDF manual.

### Examples

Queries glyph indexes for two letters:

 MBS ( "DynaPDF.GetGlyphIndex"; $PDF ; Code("A") ) &amp; ¶ &amp; MBS ( "DynaPDF.GetGlyphIndex"; $PDF ; Code("z") )  
### See also

- [DynaPDF.GetFieldIndex](DynaPDFGetFieldIndex.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetFieldIndex](DynaPDFSetFieldIndex.md)

### Release notes

- **Version 14.5**
    - Added [DynaPDF.GetGlyphIndex](https://www.mbsplugins.eu/DynaPDFGetGlyphIndex.shtml) and [DynaPDF.GetGlyphOutline](https://www.mbsplugins.eu/DynaPDFGetGlyphOutline.shtml) functions.

### Blog Entries

- [New in MBS FileMaker Plugin in Version 14.5](https://www.mbsplugins.de/archive/2025-01-08/New_in_MBS_FileMaker_Plugin_in/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 14.5pr1](https://www.mbsplugins.de/archive/2024-10-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 26th September 2024 , last changed 26th September 2024

  
[DynaPDF.GetGStateFlags](DynaPDFGetGStateFlags.md) - [DynaPDF.GetGlyphOutline](DynaPDFGetGlyphOutline.md)

[HTML Version](DynaPDFGetGlyphIndex.shtml)