DynaPDF.CreateXFAStream
-----------------------

Creates an XFA stream and adds it to the global XFA resource array.

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

MBS( "DynaPDF.CreateXFAStream"; PDF; Name; XML ) 

**MBS**( **"DynaPDF.CreateXFAStream";** /\* Creates an XFA stream and adds it to the global XFA resource array. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Name**; /\* The name for the stream. \*/   
**$XML**) /\* The XML for the stream. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Name | The name for the stream. |  |
| XML | The XML for the stream. |  |

### Result

Returns number or error.

### Description

Creates an XFA stream and adds it to the global XFA resource array.   
The parameter Name must be the name of the XFA resource. XML must be a valid XFA stream buffer or empty text, if the buffer should be set later with [DynaPDF.SetXFAStream](DynaPDFSetXFAStream.md).   
If the function succeeds the return value is the stream handle, a value greater or equal zero.   
If the function fails the return value is an error message.   
See also [CreateXFAStream](https://www.monkeybreadsoftware.com/DynaPDF-Manual/CreateXFAStream.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.GetXFAStream](DynaPDFGetXFAStream.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetXFAStream](DynaPDFSetXFAStream.md)

### Release notes

- **Version 9.5**
    - Added [DynaPDF.CreateXFAStream](http://www.mbsplugins.eu/DynaPDFCreateXFAStream.shtml) and [DynaPDF.SetXFAStream](http://www.mbsplugins.eu/DynaPDFSetXFAStream.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 9.5pr4](https://www.mbsplugins.de/archive/2019-10-21/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 20th October 2019 , last changed 17th July 2022

  
[DynaPDF.CreateURIAction](DynaPDFCreateURIAction.md) - [DynaPDF.CustomerID](DynaPDFCustomerID.md)

[HTML Version](DynaPDFCreateXFAStream.shtml)