DynaPDF.GetDocInfoAsJSON
------------------------

Queries all document information 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.GetDocInfoAsJSON"; PDF ) 

**MBS**( **"DynaPDF.GetDocInfoAsJSON";** /\* Queries all document information as JSON array. \*/  
**$PDF**) /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |

### Result

Returns JSON or error.

### Description

Queries all document information as JSON array.  
JSON includes text for various document information properties including Author, Creator, Keywords, Producer, Subject, Title, Company, PDF-X Version, PDF-X Conf, CreationDate and ModDate.  
As custom keys can be defined in PDF, those may get included, too.  
  
Alternatively you can use [DynaPDF.GetDocInfoCount](DynaPDFGetDocInfoCount.md) and loop to call [DynaPDF.GetDocInfo](DynaPDFGetDocInfo.md) individual values.  
  
See also [DynaPDF.GetImportDocInfo](DynaPDFGetImportDocInfo.md) and [DynaPDF.GetImportDocInfoAsJSON](DynaPDFGetImportDocInfoAsJSON.md) for the current open import PDF.  
See also [GetDocInfoAsJSON](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetDocInfo.shtml) function in DynaPDF manual.

### Examples

Query JSON:

 Set Variable \[ $JSON ; Value: MBS ( "DynaPDF.GetDocInfoAsJSON"; PDF ) \]  
<small>  
Example result:   
{ "Producer" : "DynaPDF 4.0.41.118" , "Title" : "Installation" , "Creator" : "Pages" , "CreationDate" : "D:20191121163638Z00'00'" , "ModDate" : "D:20191121163638Z00'00'" } </small>Query document information:

 Set Variable \[ $pdf ; Value: MBS ("[DynaPDF.New](DynaPDFNew.md)") \]   
\# Load PDF from container   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.OpenPDFFromContainer](DynaPDFOpenPDFFromContainer.md)"; $pdf ; PDF JSON::PDF ) \]   
\# import a page   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.ImportPDFFile](DynaPDFImportPDFFile.md)"; $pdf ; 1) \]   
\#   
\# query document information   
Set Variable \[ $JSON ; Value: MBS ("DynaPDF.GetDocInfoAsJSON"; $pdf ) \]   
If \[ MBS ("IsError") = 0 \]   
 Set Variable \[ $JSON ; Value: MBS ("[JSON.Colorize](JSONColorize.md)"; $JSON ) \]   
End If  
\#   
\# store in field   
Set Field \[ PDF JSON::JSON ; $JSON \]   
\# Release memory   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.Release](DynaPDFRelease.md)"; $pdf ) \]  
### See also

- [DynaPDF.GetActionsAsJSON](DynaPDFGetActionsAsJSON.md)
- [DynaPDF.GetFontsAsJSON](DynaPDFGetFontsAsJSON.md)
- [DynaPDF.GetImportDocInfo](DynaPDFGetImportDocInfo.md)
- [DynaPDF.GetImportDocInfoAsJSON](DynaPDFGetImportDocInfoAsJSON.md)
- [DynaPDF.ImportPDFFile](DynaPDFImportPDFFile.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.Release](DynaPDFRelease.md)
- [DynaPDF.SysFontInfoAsJSON](DynaPDFSysFontInfoAsJSON.md)
- [IsError](IsError.md)
- [JSON.Colorize](JSONColorize.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

- [Unlocking the Power of PDFs in FileMaker with DynaPDF and the MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2024-09-16/Unlocking_the_Power_of_PDFs_in/monkeybreadsoftware_blog_filemaker)
- [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 10th April 2022

  
[DynaPDF.GetDocInfo](DynaPDFGetDocInfo.md) - [DynaPDF.GetDocInfoCount](DynaPDFGetDocInfoCount.md)

[HTML Version](DynaPDFGetDocInfoAsJSON.shtml)