DynaPDF.SetLeading
------------------

Sets text leading.

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

MBS( "DynaPDF.SetLeading"; PDF; leading ) 

**MBS**( **"DynaPDF.SetLeading";** /\* Sets text leading. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$leading**) /\* New leading size or zero.e.g. 0 \*/ 

### Parameters

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

### Result

Returns OK or error message.

### Description

Sets text leading.  
The function sets the leading that is used by the functions [DynaPDF.AddContinueText](DynaPDFAddContinueText.md) and [DynaPDF.WriteFText](DynaPDFWriteFText.md) to calculate the distance between two text lines. The default leading in PDF is the font size. A value of 0 determines that the font size should be used as leading, this is the default behavior.  
See also [SetLeading](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetLeading.shtml) function in DynaPDF manual.

### Examples

Set line height:

 Set Variable \[$r ; Value:MBS ("DynaPDF.SetLeading"; $pdf ; 18)\]  
### See also

- [DynaPDF.AddContinueText](DynaPDFAddContinueText.md)
- [DynaPDF.BeginContinueText](DynaPDFBeginContinueText.md)
- [DynaPDF.GetLeading](DynaPDFGetLeading.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetMetadata](DynaPDFSetMetadata.md)
- [DynaPDF.SetOpacity](DynaPDFSetOpacity.md)
- [DynaPDF.WriteFText](DynaPDFWriteFText.md)

### Example Databases

- [DynaPDF/Book Creation](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Book%20Creation.shtml#3ScriptAnchor_)
- [DynaPDF/Invoice/Invoice](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Invoice/Invoice.shtml#3ScriptAnchor_)

This function checks for a license.

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

  
[DynaPDF.SetLanguage](DynaPDFSetLanguage.md) - [DynaPDF.SetLineAnnotPoints](DynaPDFSetLineAnnotPoints.md)

[HTML Version](DynaPDFSetLeading.shtml)