Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 549 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

In this article we want to introduce you the new functions from the MBS FileMaker Plugin in version 13.2.

FMP20.png

FileMaker 2023

As you have probably already noticed, FileMaker 2023 was launched at the end of April. We are happy to announce that we have adapted our plugin to be compatible with the new FileMaker version and you can use the functions as usual under FileMaker 20.1. With the Release 13.2 we support FileMaker 7 to the latest version 20.1.

DynaPDF

DynaPDF focuses in this release on the integration of JavaScript codes in the documents. Already since plugin version 6.4 we can include JavaScript actions in a PDF document. A JavaScript Action causes a script to be compiled and executed by the JavaScript interpreter of Adobe's Acrobat. Depending on the nature of the scripts, this can cause various interactive form fields in the document to update their values or change their visual appearances. With the new function DynaPDF.ChangeJavaScriptAction you can replace an existing JavaScript action with a new one. If you want to know which action has been stored use the DynaPDF.GetJavaScriptAction function to find out. As return you get the JavaScript code as string. You can also add a global JavaScript to the PDF document with the function DynaPDF.AddJavaScript. In case of an already existing global JavaScript you can change the name of the JavaScript with DynaPDF.ChangeJavaScriptName. With DynaPDF.ChangeJavaScript you not only change the name of a global JavaScript but you can also replace it completely with a new one. If you want to read the code of the global JavaScript, you can use the DynaPDF.GetJavaScript function. 

To find out how many actions are stored in a PDF document, you can use the DynaPDF.GetActionCount function. This function returns the number of actions. This value can be used to enumerate actions or to delete specific action types.

In PDFs we can also work with tags to provide accessible metadata. We have to open a tag first, then we add the content for the tag and then we have to close it again. For this task we have the functions DynaPDF.OpenTag and DynaPDF.CloseTag.

If we use tabs in DynaPDF we can now also determine their length. For this we use the DynaPDF.SetTabLen function. In the parameters we set how many spaces a tab should measure. The minimum number we can specify is 1 and the maximum number of spaces is 256. The default value is 3. Of course you can also query the specified number of spaces. For this you can use the DynaPDF.GetTabLen function.

MongoDB

Since a few releases we also have the possibility to connect to a MongoDB database and work with it. In this release we extend the functionalities related to MongoDB. First of all we can now convert information as Binary JSON for Mongo DB. The information is first read in an encoding of your choice or by default with UTF-8, converts to base64 and embeds it in a $binary JSON for use in MongoDB. You can use MongoDB.TextToBinary for texts and MongoDB.ContainerToBinary for containers. 

Two other functions deal with time in Mongo DB. With the function MongoDB.NowUTC we get the current UTC timestamp. This can look like this:

{ "$date" : "2023-03-09T11:39:34Z" }

Matching to this there is the function MongoDB.Time which converts an given FileMaker timestamp into JSON which contains the matching UTC timestamp.

 

GMImage

With the help of GraphicsMagick you can really breathe life into your images. I'm sure some of you already noticed this in our Advent Calendar last year. You can write your GMImage in many file formats into a conatiner field. The matching functions like GMImage.WriteToJPEGContainer or GMImage.WriteToPNGContainer help you to do this. In this release we want to extend this possibility with the WebP format. With the new function GMImage.WriteToWebPContainer you can now save a picture in WebP format into a container. Also we adapted the component for the WebP format. This includes reading and writing WebP files, so you can directly upload WebP functions from your CMS solution to your web server.

Keyboard

Since version 9.5 you can already show the keyboard with the function Window.ShowKeyboard. If you have called this function under Windows a second time, it has been hidden again. So that you can hide it now also under Mac by Script, we have now the new function Window.HideKeyboard available with which you can hide the keyboard again.

Dictionary

With the new function Dictionary.ToMatrix we can convert a dictionary into a matrix. This is useful e.g. if we have values in our dictionary which we want to calculate or which we want to process tabularly.

Blog13.2_Bild3.png

Archive

We extend the Componete archives with a few functions that provide us with the current version of various libraries. Feel free to have a look at these functions.

 

List Dialog

In the List Dialog component we have a new function. With the functions from the ListDialog component you can easily generate a dialog window with a list of values that you can filter and select. With the new ListDialog.IsVisible function you can check if a ListDialog is currently displayed. 

ListDialog2.png

XL

With the new function XL.Sheet.AreCellsEmpty also the component XL again grows. With this function you can check if there is any value in a certain area, which you define by specifying the first and last row and column in the parameters. If there is a value in at least one cell you get a 0 for false. If all cells are empty then the function returns a 1. 

Mac and iOS

There are also new features for Mac and the iOS SDK

Vision

We have a new function for working with Vision. The new function Vision.RecognizeTextJSON can be used for text recognition. In contrast to the older Vision.RecognizeText you get a JSON as result instead of a simple text. The JSON not only gives us the information about the text itself, but also tells us where the individual pieces of text are located on the image. For this image, for example, we get the following JSON.

Blog13.2_Bild1.png

[
  {
    "Height" : 38.000000000000014,
    "Text" : "This is",
    "Confidence" : 1,
    "X" : 40,
    "Width" : 151.99999618530273,
    "Y" : 51.999999999999986
  },
  {
    "Height" : 39.999999999999993,
    "Text" : "a Text",
    "Confidence" : 1,
    "X" : 42,
    "Width" : 141.99999618530273,
    "Y" : 104
  }
]

This has the advantage that you can, for example, in cooperation with DynaPDF, place the content of the text invisible on the image, so that the text can be highlighted.

PhotoPicker

Still relatively new is our PhotoPicker component which allows us to select photos from our photo library without needing permission dialogs. We introduced this component in release 12.5. Today it gets a new function called PhotoPicker.SetSize. With it we can choose the size of our desired popover. In the parameters we simply specify width and height. 

And the dialog can be used on macOS, too:

Blog13.2_Bild2.png

AppleScript

With our functions we try to make your life as a developer as easy as possible. We hope that with the new function AppleScript.LastErrorPosition we come closer to this goal. If you run an Apple Script from FileMaker it can always come to an error. With AppleScript.LastError you could display the error code of the last error that occurred in the code. Matching AppleScript.LastErrorMessage returns the error message. With the new function AppleScript.LastErrorPosition we now query the position of the last compile error that occurred. 

Clipboard

The new function Clipboard.AddText adds text to the clipboard. This function allows on macOS to put multiple things on the clipboard, like both a text representation and an xml one. So if user pastes to a text editor, they get the text editor, but if they paste into your app, you can get back the xml.

Windows 

There is also new gerate functionality for Windows:

Windows PDF

For years we have been offering the PDFKit for Mac users to do small PDF tasks. Now since Microsoft has added some PDF features to their framework we can make them available for you. We have added the following functions for you in this release:

 

FMWindowsPDF.png

The main task of the Windows PDF functions is the reading of PDF documents and the rendering of preview images. But the range of functions is not nearly as great as it is for DynaPDF and the Windows PDF functions are not an replacement for DynaPDF. If you want to learn more about the differences between DynaPDF the PDFKit and the new Windows PDF functions please read out blogpost: Comparing DynaPDF vs PDFKit and WinPDF If you want more informations to that topic read our Blogpost: Windows PDF Functions

Windows Media Foundation Player

To support the work with the Windows Media Foundation Player we have added some new functions to this component to help you analyze audio samples. With WMFP.GetAudioSamplesPerSecond you can query how many samples per second your audio has. With WMFP.GetAudioBitsPerSample you can get the bits per sample. With WMFP.GetAudioChannels you get the number of audio input streams. If you have a video file, you can use the function WMFP.GetVideoFrameRate to get the frame count per second. This is the frame rate. 

We hope you will also find some interesting new features. We wish you a lot of fun with MBS FileMaker Plugin Version 13.2. If you need a license or have any questions, please contact us.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.