Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

DynaPDF.GetFieldsAsJSON

Queries all form fields as JSON array.

Component Version macOS Windows Linux Server FileMaker iOS SDK
DynaPDF 10.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.GetFieldsAsJSON"; PDF { ; Flags } )   More

Parameters

Parameter Description Example Flags
PDF The PDF reference returned from DynaPDF.New. $pdf
Flags Pass value for combination of flags you need.
Add 1 to get flat list instead of fields and children as items within the parent field.
Add 2 to include font information for field and edit fonts.
Add 4 to include font buffer data.
0 Optional

Result

Returns JSON or error.

Description

Queries all form fields as JSON array.
See TPDFFieldEx structure in DynaPDF manual, which we convert to JSON for you.

Keys include Deleted, BBox, FieldType, GroupType, Handle, BackColor, BackColorSP, BorderColor, BorderColorSP, BorderStyle, BorderWidth, CharSpacing, Checked, CheckBoxChar, DefState, Description, EditFont, ExpValCount, ExpValue, FieldFlags, FieldFont, FontSize, FieldName, HighlightMode, IsCalcField, MapName, MaxLen, ChildrenCount, Children, Parent, PageNum, Rotate, TextAlign, TextColor, TextColorSP, TextScaling, ToolTip, UniqueName, Value, WordSpacing, PageIndex, Barcode, Signature, ModDate, CaptionPos, DownCaption, DownImage, RollCaption, RollImage, UpCaption, UpImage, OC, Action, Action and Events.

Examples

Query JSON:

Set Variable [ $JSON; Value: MBS( "DynaPDF.GetFieldsAsJSON"; PDF ) ]

Query document information:

Set Variable [ $pdf ; Value: MBS("DynaPDF.New") ]
# Load PDF from container
Set Variable [ $r ; Value: MBS("DynaPDF.OpenPDFFromContainer"; $pdf; PDF JSON::PDF) ]
# import a page
Set Variable [ $r ; Value: MBS("DynaPDF.ImportPDFFile"; $pdf; 1) ]
#
# query all fields:
Set Variable [ $JSON ; Value: MBS("DynaPDF.GetFieldsAsJSON"; $pdf) ]
If [ MBS("IsError") = 0 ]
    Set Variable [ $JSON ; Value: MBS("JSON.Colorize"; $JSON) ]
End If
#
# store in field
Set Field [ PDF JSON::JSON ; $JSON ]
# Release memory
Set Variable [ $r ; Value: MBS("DynaPDF.Release"; $pdf) ]

See also

Release notes

Example Databases

Blog Entries

FileMaker Magazin

Created 16th September 2020, last changed 11st January 2021


DynaPDF.GetFieldType   -   DynaPDF.GetFontAsJSON

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins

Start Chat