DynaPDF.GetEmbeddedFile
-----------------------

Retrieves the details of an embedded file.

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

MBS( "DynaPDF.GetEmbeddedFile"; PDF; Index; Selector { ; Encoding } ) 

**MBS**( **"DynaPDF.GetEmbeddedFile";** /\* Retrieves the details of an embedded file. \*/  
**$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 \*/   
**$Selector**; /\* Which value to query.  
Can be DataSize, FileSize, Compressed, Name, FileName, isURL, UnicodeName, Description, MimeType, CreationDate, ModificationDate or CheckSum.  
With value "Content" you can query the content of the embedded file as text. Optional Text encoding parameter is used in this case.e.g. "Name" \*/   
**$Encoding**) /\* Optional; The text encoding for the content. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| 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 |  |
| Selector | Which value to query.   Can be DataSize, FileSize, Compressed, Name, FileName, isURL, UnicodeName, Description, MimeType, CreationDate, ModificationDate or CheckSum.   With value "Content" you can query the content of the embedded file as text. Optional Text encoding parameter is used in this case. | "Name" |  |
| Encoding | The text encoding for the content.   Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the [FAQ](https://www.monkeybreadsoftware.com/filemaker/faq.shtml). |  | Optional |

### Result

Returns value or error.

### Description

Retrieves the details of an embedded file.  
See also [GetEmbeddedFile](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetEmbeddedFile.shtml) function in DynaPDF manual.

### Examples

Query name of first file:

 MBS ( "DynaPDF.GetEmbeddedFile"; $pdf ; 0; "name")  
Query content as text in UTF-8:

 MBS ( "DynaPDF.GetEmbeddedFile"; $pdf ; 0; "Content"; "UTF-8" )  
### See also

- [DynaPDF.CheckEmbeddedFileCheckSum](DynaPDFCheckEmbeddedFileCheckSum.md)
- [DynaPDF.CreateGoToEAction](DynaPDFCreateGoToEAction.md)
- [DynaPDF.DeleteEmbeddedFile](DynaPDFDeleteEmbeddedFile.md)
- [DynaPDF.FindEmbeddedFile](DynaPDFFindEmbeddedFile.md)
- [DynaPDF.GetEmbeddedFileAsContainer](DynaPDFGetEmbeddedFileAsContainer.md)
- [DynaPDF.GetEmbeddedFileAsJSON](DynaPDFGetEmbeddedFileAsJSON.md)
- [DynaPDF.GetEmbeddedFileCount](DynaPDFGetEmbeddedFileCount.md)
- [DynaPDF.GetEmbeddedFilesAsJSON](DynaPDFGetEmbeddedFilesAsJSON.md)
- [DynaPDF.New](DynaPDFNew.md)

### Release notes

- **Version 15.0**
    - Fixed [DynaPDF.GetEmbeddedFile](https://www.mbsplugins.eu/DynaPDFGetEmbeddedFile.shtml) to return checksum as Hex string.
- **Version 14.1**
    - Improved [DynaPDF.GetEmbeddedFileAsContainer](https://www.mbsplugins.eu/DynaPDFGetEmbeddedFileAsContainer.shtml) to return images with preview.
- **Version 10.5**
    - Added [DynaPDF.GetAnnotationAsJSON](https://www.mbsplugins.eu/DynaPDFGetAnnotationAsJSON.shtml), [DynaPDF.GetColorSpaceAsJSON](https://www.mbsplugins.eu/DynaPDFGetColorSpaceAsJSON.shtml), [DynaPDF.GetEmbeddedFileAsJSON](https://www.mbsplugins.eu/DynaPDFGetEmbeddedFileAsJSON.shtml), [DynaPDF.GetFieldAsJSON](https://www.mbsplugins.eu/DynaPDFGetFieldAsJSON.shtml) and [DynaPDF.GetFontAsJSON](https://www.mbsplugins.eu/DynaPDFGetFontAsJSON.shtml) functions.
    - Added [DynaPDF.GetAnnotationsAsJSON](https://www.mbsplugins.eu/DynaPDFGetAnnotationsAsJSON.shtml), [DynaPDF.GetBookmarksAsJSON](https://www.mbsplugins.eu/DynaPDFGetBookmarksAsJSON.shtml), [DynaPDF.GetColorSpacesAsJSON](https://www.mbsplugins.eu/DynaPDFGetColorSpacesAsJSON.shtml), [DynaPDF.GetDocInfoAsJSON](https://www.mbsplugins.eu/DynaPDFGetDocInfoAsJSON.shtml), [DynaPDF.GetEmbeddedFilesAsJSON](https://www.mbsplugins.eu/DynaPDFGetEmbeddedFilesAsJSON.shtml), [DynaPDF.GetFieldsAsJSON](https://www.mbsplugins.eu/DynaPDFGetFieldsAsJSON.shtml), [DynaPDF.GetFontsAsJSON](https://www.mbsplugins.eu/DynaPDFGetFontsAsJSON.shtml), [DynaPDF.GetImportDocInfoAsJSON](https://www.mbsplugins.eu/DynaPDFGetImportDocInfoAsJSON.shtml) and [DynaPDF.SysFontInfoAsJSON](https://www.mbsplugins.eu/DynaPDFSysFontInfoAsJSON.shtml) functions.
- **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#6ScriptAnchor_)
- [DynaPDF/ZUGFeRD and Facture-X/ZUGFeRD Extract XML](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/ZUGFeRD%20and%20Facture-X/ZUGFeRD%20Extract%20XML.shtml#2ScriptAnchor_)

### Blog Entries

- [Electronic invoices in FileMaker](https://www.mbsplugins.de/archive/2025-03-06/Electronic_invoices_in_FileMak/monkeybreadsoftware_blog_filemaker)
- [Elektronische Rechnungen in FileMaker](https://www.mbsplugins.de/archive/2025-03-04/Elektronische_Rechnungen_in_Fi/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.0pr7](https://www.mbsplugins.de/archive/2025-01-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Extract invoice for ZUGFeRD and Facture-X](https://www.mbsplugins.de/archive/2024-09-20/Extract_invoice_for_ZUGFeRD_an/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 5.5pr1](https://www.mbsplugins.de/archive/2015-12-09/MBS_FileMaker_Plugin_version_5/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)

### FileMaker Magazin

- [Ausgabe 1/2018, Seite 26](https://filemaker-magazin.de/neuigkeit/3981-Appetithappen-FMM_201801)

This function checks for a license.

Created 11st September 2014 , last changed 15th December 2015

  
[DynaPDF.GetDynaPDFVersion](DynaPDFGetDynaPDFVersion.md) - [DynaPDF.GetEmbeddedFileAsContainer](DynaPDFGetEmbeddedFileAsContainer.md)

[HTML Version](DynaPDFGetEmbeddedFile.shtml)