DynaPDF.SetNeedAppearance
-------------------------

Sets need appearance flag.

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

MBS( "DynaPDF.SetNeedAppearance"; PDF; Flag ) 

**MBS**( **"DynaPDF.SetNeedAppearance";** /\* Sets need appearance flag. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Flag**) /\* The new value.  
Pass 1 to ask viewer to redraw form content or 0 to not.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Flag | The new value.   Pass 1 to ask viewer to redraw form content or 0 to not. | 1 |

### Result

Returns OK or error.

### Description

Sets need appearance flag.  
The global NeedAppearance flag of an Interactive Form specifies whether a PDF viewer should rebuild the field appearances when opening the file or whether the existing definitions should be used. DynaPDF creates always appearance streams for all field types. However, in certain cases it can be useful to let the viewer render fields with their own algorithms because the exact way how Adobe’s Acrobat builds the field appearances is not documented.   
For example, when editing the contents of a text field in Adobe’s Acrobat the viewer rebuilds first the field appearance before placing the editing cursor into the field. The new appearance created from Adobe’s Acrobat can be slightly different in comparison to the one that was created by DynaPDF. The visible contents, especially of text fields, is sometimes not absolutely stable.   
If the NeedAppearance flag is set, the viewer uses already its own algorithms to build the field appearances when opening the file. This avoids visible changes when editing a field. However, the NeedAppearance flag must not be set to true if a form contains page templates.   
See also [SetNeedAppearance](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetNeedAppearance.shtml) function in DynaPDF manual.

### Examples

Require appearance rendering:

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

- [DynaPDF.GetNeedAppearance](DynaPDFGetNeedAppearance.md)
- [DynaPDF.New](DynaPDFNew.md)

### Release notes

- **Version 13.2**
    - Added [DynaPDF.GetNeedAppearance](https://www.mbsplugins.eu/DynaPDFGetNeedAppearance.shtml) and [DynaPDF.SetNeedAppearance](https://www.mbsplugins.eu/DynaPDFSetNeedAppearance.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 13.2pr1](https://www.mbsplugins.de/archive/2023-04-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 26th March 2023 , last changed 27th March 2023

  
[DynaPDF.SetMiterLimit](DynaPDFSetMiterLimit.md) - [DynaPDF.SetNumberFormat](DynaPDFSetNumberFormat.md)

[HTML Version](DynaPDFSetNeedAppearance.shtml)