DynaPDF.SetUserUnit
-------------------

The function sets the user unit of the current open page.

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

MBS( "DynaPDF.SetUserUnit"; PDF; Value ) 

**MBS**( **"DynaPDF.SetUserUnit";** /\* The function sets the user unit of the current open page. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Value**) /\* The new scale.e.g. 10.0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Value | The new scale. | 10.0 |

### Result

Returns OK on success or error message.

### Description

The function sets the user unit of the current open page.   
A user unit is a scaling factor. The page format and all page coordinates are multiplied with this factor in a viewer application. The default size of a PDF unit is 1/72 inch. User units can be useful if the page format would be too large to be expressed in standard PDF units. The largest page format in PDF is limited to 14,400 units or 200 inches. This limit can be extended with the user unit.  
The largest value that is supported is 75.0 which results in a maximum page format of 15,000 x 15,000 inches or 1,800,000 units. Note that all functions which return page coordinates or page properties do not consider the user unit.  
The page format must still be in the range 3..14400 units. It is also strongly recommended to set the user unit only if necessary. This is only the case if the required page format is larger 14400 units.  
Default value = 1.0  
See also [SetUserUnit](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetUserUnit.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.GetUserUnit](DynaPDFGetUserUnit.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetPageHeight](DynaPDFSetPageHeight.md)
- [DynaPDF.SetPageWidth](DynaPDFSetPageWidth.md)

### Release notes

- **Version 14.4**
    - Fixed incorrect returning of result for [DynaPDF.SetRenderingIntent](https://www.mbsplugins.eu/DynaPDFSetRenderingIntent.shtml), [DynaPDF.SetUserUnit](https://www.mbsplugins.eu/DynaPDFSetUserUnit.shtml) and [DynaPDF.SetLineWidth](https://www.mbsplugins.eu/DynaPDFSetLineWidth.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 14.4pr2](https://www.mbsplugins.de/archive/2024-08-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 3.4pr2](https://www.mbsplugins.de/archive/2013-08-28/MBS_Filemaker_Plugin_version_3/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[DynaPDF.SetUseVisibleCoords](DynaPDFSetUseVisibleCoords.md) - [DynaPDF.SetViewerPreferences](DynaPDFSetViewerPreferences.md)

[HTML Version](DynaPDFSetUserUnit.shtml)