Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
DynaPDF.GetFieldsAsJSON
Queries all form fields as JSON array.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 10.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
The PDF reference returned from DynaPDF.New. | |||
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 help, 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.
Added FullyQualifiedFieldName as field for v14.0.
See also GetFieldsAsJSON function in DynaPDF manual.
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
- DynaPDF.GetActionsAsJSON
- DynaPDF.GetFieldAsJSON
- DynaPDF.GetFontAsJSON
- DynaPDF.GetFontsAsJSON
- DynaPDF.ImportPDFFile
- DynaPDF.New
- DynaPDF.OpenPDFFromContainer
- DynaPDF.Release
- IsError
- JSON.Colorize
Release notes
- Version 11.5
- Added new fields FmtTextColor and FmtText for DynaPDF.GetField and DynaPDF.GetFieldsAsJSON.
- Version 11.2
- Fixed DynaPDF.GetFieldsAsJSON function to produce better JSON.
- Version 11.0
- Fixed DynaPDF.GetFieldAsJSON and DynaPDF.GetFieldsAsJSON to return ActionType with that key name instead of Action twice.
- Version 10.5
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 11.5pr3
- MBS FileMaker Plugin, version 11.2pr1
- MBS FileMaker Plugin, version 11.0pr6
- New in MBS FileMaker Plugin 10.5
- MBS FileMaker Plugin, version 10.5pr1
- Embrace JSON
FileMaker Magazin
This function checks for a license.
Created 16th September 2020, last changed 8th November 2023