In this article we want to introduce you the new functions from the MBS FileMaker Plugin in version 13.1.
With the new functions of the Archive component you can easily create your own archives. First, you create a new archive with the Archive.Create function. In this function you define the format in which your archive should be written. The following formats are available: 7zip, ar, arbsd, argnu, arsvr4, bsdtar, cd9660, cpio, gnutar, iso, iso9660, mtree, mtree-classic, newc, odc, oldtar, pax, paxr, posix, raw, rpax, shar, shardump, ustar, v7tar, v7, warc, xar and zip. Then we have to choose a filter that fits the format. Optionally, we can then specify a storage location with a file path. You can pass specific information about a format in further parameters and specify a password for the archive, which must be entered by the user when opening it. You can then use the Archive.AddFile, Archive.AddText and Archive.AddContainer functions to add the appropriate files to this archive. When you are done, close with Archive.Close. If we expect a container value back it will be in the output of this function. For a file that has been saved on disk, we get an OK. Here we see a script in which first the zip archive is created and then a text file, a file from a container and two files from a folder are added to the archive. After that the archive is closed again and stored on the desktop.
Set Variable [ $Path ; Value: MBS("Path.AddPathComponent"; MBS("Folders.UserDesktop"); "abc.zip") ] Set Variable [ $r ; Value: MBS("Archive.Create"; "zip"; "deflate"; $Path; ""; "Hello") ] Set Variable [ $r ; Value: MBS( "Archive.AddText"; "Hello World"; "UTF-8"; "Hello.txt" ) ] Set Variable [ $r ; Value: MBS( "Archive.AddContainer"; Tabelle::Container ; "Image.png" ) ] Set Variable [ $r ; Value: MBS("Archive.AddFile"; "a.png¶b.pdf"; MBS("Path.AddPathComponent"; MBS("Folders.UserDesktop"); "testA")) ] Set Variable [ $r ; Value: MBS("Archive.Close") ]
The new functions from the MongoDB component should make your work with Mongo DB much easier. We added aggregate functions for you to query data by applying a filter, sorting rules and grouping either to the whole database or only to a specific collection. Also, we can query the TLS status of the database to see if it is encrypted. With the function MongoDB.GetOptions we can query the options from the URL as a JSON document.
There are also new functions in the XL section, which allows you to read and write Excel documents without having Excel installed. We have 45 new functions for handling form controls. Here you can see a list of the new functions. Feel free to try them out.
We also have a few other new features. For example you can test with the new XL.Book.IsWriteProtected function if a workbook is readonly before an error occurs if you want to write to Celle here. You can also determine and set the default Row Hight. Even the marking of cells has changed a lot. So you can also set a cell to active with the new function XL.Sheet.SetActiveCell. In the parameters we specify the wookbook, the sheet index and row and column index.
Also in the DynaPDF area we have news. First we have a new function with which we can rename named destinations in a PDF. For this you can now use the DynaPDF.ChangeNamedDest.
Since version 4.4 we have already included the function DynaPDF.CreateStructureTree in the plugin. This function creates a global structure tree that is required to create Tagged PDF files. With the new function DynaPDF.CreateStructureTreeEx we can now additionally specify the type of root tag. This can be type, div, document, part or sect. In all other details the functions work identically.
We can now use the two functions DynaPDF.SaveAndSignFileExt1 and DynaPDF.SaveAndSignFileExt2 to sign a PDF with an external PKCS7 signature provider. After the DynaPDF.SaveAndSignFileExt1 function has returned you a hash to sign, you can pass in DynaPDF.SaveAndSignFileExt2 the signature to close and finish the PDF file.
DynaPDF now also supports writing PDF/UA-1 files.
With the new function PKCS12.SignData you can now also create a PKCS#7 signature to given data. In the parameters you first specify the PKCS12 reference, then the input type, which can be text, container, image, path, PDF, data, base64 or hex. This is followed by the input data and the encoding. We also specify in which form we want to get our result back. Optionally, we can specify information about a specific input type. For example, we can specify the encoding for an output text.