DynaPDF.ChangeFontStyleEx
-------------------------

The function changes the font style of a font like [DynaPDF.ChangeFontStyle](DynaPDFChangeFontStyle.md) but it accepts also font styles like 2 (bold) or 1 (italic).

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

MBS( "DynaPDF.ChangeFontStyleEx"; PDF; Style ) 

**MBS**( **"DynaPDF.ChangeFontStyleEx";** /\* The function changes the font style of a font like DynaPDF.ChangeFontStyle but it accepts also font styles like 2 (bold) or 1 (italic). \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Style**) /\* The new font style. See DynaPDF.LoadFont for details.e.g. 3 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Style | The new font style. See DynaPDF.LoadFont for details. | 3 |

### Result

Returns OK or error message.

### Description

The function changes the font style of a font like [DynaPDF.ChangeFontStyle](DynaPDFChangeFontStyle.md) but it accepts also font styles like 2 (bold) or 1 (italic).   
These flags can be used to explicitly enable the emulation of a missing font style.  
See also [ChangeFontStyleEx](https://www.monkeybreadsoftware.com/DynaPDF-Manual/ChangeFontStyleEx.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.ChangeFont](DynaPDFChangeFont.md)
- [DynaPDF.ChangeFontEx](DynaPDFChangeFontEx.md)
- [DynaPDF.ChangeFontSize](DynaPDFChangeFontSize.md)
- [DynaPDF.ChangeFontStyle](DynaPDFChangeFontStyle.md)
- [DynaPDF.New](DynaPDFNew.md)

This function checks for a license.

Created 18th August 2014 , last changed 10th November 2025

  
[DynaPDF.ChangeFontStyle](DynaPDFChangeFontStyle.md) - [DynaPDF.ChangeJavaScript](DynaPDFChangeJavaScript.md)

[HTML Version](DynaPDFChangeFontStyleEx.shtml)