DynaPDF.ChangeFontStyle
-----------------------

This function changes the style of the current font.

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

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

**MBS**( **"DynaPDF.ChangeFontStyle";** /\* This function changes the style of the current font. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Style**) /\* The new font style. See DynaPDF.LoadFont for details.e.g. 8 \*/ 

### 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. | 8 |

### Result

Returns OK or error message.

### Description

This function changes the style of the current font.   
Only the style flags Underlined (4) and Striked (8) can be set with this function. The font styles fsBold and fsItalic requires another font file that must be selected with [DynaPDF.SetFont](DynaPDFSetFont.md).  
See also [ChangeFontStyle](https://www.monkeybreadsoftware.com/DynaPDF-Manual/ChangeFontStyle.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.ChangeFont](DynaPDFChangeFont.md)
- [DynaPDF.ChangeFontEx](DynaPDFChangeFontEx.md)
- [DynaPDF.ChangeFontSize](DynaPDFChangeFontSize.md)
- [DynaPDF.ChangeFontStyleEx](DynaPDFChangeFontStyleEx.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetFont](DynaPDFSetFont.md)

### Example Databases

- [DynaPDF/Create Text as PDFA](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Create%20Text%20as%20PDFA.shtml#3ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 27th May 2017

  
[DynaPDF.ChangeFontSize](DynaPDFChangeFontSize.md) - [DynaPDF.ChangeFontStyleEx](DynaPDFChangeFontStyleEx.md)

[HTML Version](DynaPDFChangeFontStyle.shtml)