DynaPDF.FindEmbeddedFile
------------------------

Searches for the embedded file Name and returns the handle of it when it can be found.

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

MBS( "DynaPDF.FindEmbeddedFile"; PDF; Name ) 

**MBS**( **"DynaPDF.FindEmbeddedFile";** /\* Searches for the embedded file Name and returns the handle of it when it can be found. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Name**) /\* The name of the embedded file. \*/ 

### Parameters

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

### Result

Returns number or error.

### Description

Searches for the embedded file Name and returns the handle of it when it can be found.   
The file can then be extracted with [DynaPDF.GetEmbeddedFile](DynaPDFGetEmbeddedFile.md).  
If the function succeeds the return value is an embedded file handle, a value greater or equal zero. If the file cannot be found the return value is -1.   
  
See also [FindEmbeddedFile](https://www.monkeybreadsoftware.com/DynaPDF-Manual/FindEmbeddedFile.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.DeleteEmbeddedFile](DynaPDFDeleteEmbeddedFile.md)
- [DynaPDF.GetEmbeddedFile](DynaPDFGetEmbeddedFile.md)
- [DynaPDF.New](DynaPDFNew.md)

This function checks for a license.

Created 1st June 2016 , last changed 17th July 2022

  
[DynaPDF.FindBookmark](DynaPDFFindBookmark.md) - [DynaPDF.FindField](DynaPDFFindField.md)

[HTML Version](DynaPDFFindEmbeddedFile.shtml)