DynaPDF.SetCMapDir
------------------

The function sets a search path from which external CMap files can be loaded.

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

MBS( "DynaPDF.SetCMapDir"; PDF; Path { ; Flags } ) 

**MBS**( **"DynaPDF.SetCMapDir";** /\* The function sets a search path from which external CMap files can be loaded. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Path**; /\* Absolute native path to the folder. \*/   
**$Flags**) /\* Optional; The flags to use.   
Can be Default, Recursive or Delayed.e.g. "Default" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |  |
| Path | Absolute native path to the folder. | $path |  |
| Flags | The flags to use.    Can be Default, Recursive or Delayed. | "Default" | Optional |

### Result

Returns number of CMaps or error.

### Description

The function sets a search path from which external CMap files can be loaded.   
You can use [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md) to convert paths if needed.  
  
Requires DynaPDF Lite or Pro license.  
See also [SetCMapDir](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetCMapDir.shtml) function in DynaPDF manual.

### Examples

Set CMAP file:

 Set Variable \[ $r ; Value: MBS ("DynaPDF.SetCMapDir"; $pdf ; "/Users/cs/Desktop/samples/CMap"; "Recursive") \]  
### See also

- [DynaPDF.ExtractDocumentText](DynaPDFExtractDocumentText.md)
- [DynaPDF.ExtractText](DynaPDFExtractText.md)
- [DynaPDF.Initialize](DynaPDFInitialize.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetFieldFont](DynaPDFSetFieldFont.md)
- [DynaPDF.SetTrapped](DynaPDFSetTrapped.md)
- [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md)

### Release notes

- **Version 11.0**
    - Fixed [DynaPDF.SetCMapDir](https://www.mbsplugins.eu/DynaPDFSetCMapDir.shtml) to return number of CMaps loaded instead of OK.

### Blog Entries

- [MBS FileMaker Plugin, version 10.6pr3](https://www.mbsplugins.de/archive/2020-12-21/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 14th November 2021

  
[DynaPDF.SetBorderStyle](DynaPDFSetBorderStyle.md) - [DynaPDF.SetCharacterSpacing](DynaPDFSetCharacterSpacing.md)

[HTML Version](DynaPDFSetCMapDir.shtml)