DynaPDF.GetEmbeddedFilesAsJSON
------------------------------

Queries all embedded files as JSON array.

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

MBS( "DynaPDF.GetEmbeddedFilesAsJSON"; PDF { ; Flags } ) 

**MBS**( **"DynaPDF.GetEmbeddedFilesAsJSON";** /\* Queries all embedded files as JSON array. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Flags**) /\* Optional; Pass 1 to include data of files base64 encoded as Buffer entry.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |  |
| Flags | Pass 1 to include data of files base64 encoded as Buffer entry. | 0 | Optional |

### Result

Returns JSON or error.

### Description

Queries all embedded files as JSON array.  
See TPDFFileSpec structure in DynaPDF help, which we convert to JSON for you.  
  
Keys include Buffer, BufSize, Compressed, Name, FileName, IsURL, UnicodeFileName, Description, FileSize, MIMEType, CreateDate, ModDate, CheckSum, Index.  
See also [GetEmbeddedFilesAsJSON](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetEmbeddedFile.shtml) function in DynaPDF manual.

### Examples

Query JSON:

 Set Variable \[ $JSON ; Value: MBS ( "DynaPDF.GetEmbeddedFilesAsJSON"; PDF ) \]  
<small>  
Example result:   
\[ { "BufSize" : 8631 , "Compressed" : false, "Name" : "ZUGFeRD-invoice.xml" , "FileName" : "ZUGFeRD-invoice.xml" , "IsURL" : false, "UnicodeFileName" : "ZUGFeRD-invoice.xml" , "Description" : "Invoice as XML" , "FileSize" : 8631 , "MIMEType" : "text/xml" , "CreateDate" : "D:20200916095956+02'00'" , "ModDate" : "D:20200916095956+02'00'" , "CheckSum" : "3016D465B18605BE5338645B5B85611C" , "Index" : 0 } \] </small>### See also

- [DynaPDF.GetEmbeddedFile](DynaPDFGetEmbeddedFile.md)
- [DynaPDF.GetEmbeddedFileAsJSON](DynaPDFGetEmbeddedFileAsJSON.md)
- [DynaPDF.GetEmbeddedFileCount](DynaPDFGetEmbeddedFileCount.md)
- [DynaPDF.New](DynaPDFNew.md)

### Release notes

- **Version 10.5**
    - 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.

### Example Databases

- [DynaPDF/PDF JSON](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/PDF%20JSON.shtml#1ScriptAnchor_)

### Blog Entries

- [New in MBS FileMaker Plugin 10.5](https://www.mbsplugins.de/archive/2020-11-23/New_in_MBS_FileMaker_Plugin_10/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.5pr1](https://www.mbsplugins.de/archive/2020-10-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Embrace JSON](https://www.mbsplugins.de/archive/2020-09-29/Embrace_JSON/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 6/2020, Seite 26](https://filemaker-magazin.de/neuigkeit/4118-Appetithappen-FMM_202006)

This function checks for a license.

Created 16th September 2020 , last changed 2nd September 2022

  
[DynaPDF.GetEmbeddedFileCount](DynaPDFGetEmbeddedFileCount.md) - [DynaPDF.GetFTextHeight](DynaPDFGetFTextHeight.md)

[HTML Version](DynaPDFGetEmbeddedFilesAsJSON.shtml)