DynaPDF.GetEmbeddedFileAsContainer
----------------------------------

Returns an embedded file as a container.

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

MBS( "DynaPDF.GetEmbeddedFileAsContainer"; PDF; Index ) 

**MBS**( **"DynaPDF.GetEmbeddedFileAsContainer";** /\* Returns an embedded file as a container. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Index**) /\* The index of the embedded file. From 0 to [DynaPDF.GetEmbeddedFileCount](DynaPDFGetEmbeddedFileCount.md)-1.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Index | The index of the embedded file. From 0 to [DynaPDF.GetEmbeddedFileCount](DynaPDFGetEmbeddedFileCount.md)-1. | 0 |

### Result

Returns container value or error.

### Description

Returns an embedded file as a container.  
You can store this in a container or write it to disk using [Files.WriteFile](FilesWriteFile.md).  
See also [GetEmbeddedFileAsContainer](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetEmbeddedFile.shtml) function in DynaPDF manual.

### Examples

Query first embedded file as container:

 MBS ( "DynaPDF.GetEmbeddedFileAsContainer"; $pdf ; 0 )  
### See also

- [DynaPDF.CheckEmbeddedFileCheckSum](DynaPDFCheckEmbeddedFileCheckSum.md)
- [DynaPDF.GetEmbeddedFile](DynaPDFGetEmbeddedFile.md)
- [DynaPDF.GetEmbeddedFileCount](DynaPDFGetEmbeddedFileCount.md)
- [DynaPDF.New](DynaPDFNew.md)
- [Files.WriteFile](FilesWriteFile.md)

### Release notes

- **Version 14.1**
    - Improved [DynaPDF.GetEmbeddedFileAsContainer](https://www.mbsplugins.eu/DynaPDFGetEmbeddedFileAsContainer.shtml) to return images with preview.
- **Version 8.2**
    - Changed [DynaPDF.GetEmbeddedFileAsContainer](http://www.mbsplugins.eu/DynaPDFGetEmbeddedFileAsContainer.shtml) to work with handles from annotations.

### Example Databases

- [DynaPDF/Extract Attachments](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Extract%20Attachments.shtml#2ScriptAnchor_)
- [DynaPDF/PDF Attachments](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/PDF%20Attachments.shtml#7ScriptAnchor_)
- [DynaPDF/Shrink PDF pages](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Shrink%20PDF%20pages.shtml#4ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 14.1pr1](https://www.mbsplugins.de/archive/2024-02-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [PDF Attachments in FileMaker with DynaPDF](https://www.mbsplugins.de/archive/2024-01-29/PDF_Attachments_in_FileMaker_w/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.2pr1](https://www.mbsplugins.de/archive/2018-04-04/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 4.3pr11](https://www.mbsplugins.de/archive/2014-09-14/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 11st September 2014 , last changed 9th November 2021

  
[DynaPDF.GetEmbeddedFile](DynaPDFGetEmbeddedFile.md) - [DynaPDF.GetEmbeddedFileAsJSON](DynaPDFGetEmbeddedFileAsJSON.md)

[HTML Version](DynaPDFGetEmbeddedFileAsContainer.shtml)