Sunday, March 25, 2012

XFDL Viewer for Mac

    Today I decided to revisited a project that I had dropped almost a year ago; to write an XFDL viewer for Mac osX. The last time I tried this, it was a disaster. The forms sort of exploded all over the window and being unfamiliar with RealStudio, I was unable to figure out control arrays. Basically, when ever I opened  a second form, it would also write all of that data onto the first one. It as a less than stellar first attempt.

    So here I am, almost a year later and there is still no stable XFDL viewer for the Mac. I suppose I should start with answering the most basic question; what is XFDL?

    A while back, the U.S. Military decided that it needed a secure document format for electronic communication. They chose a small company that produced the "Pure Edge" document viewer. That company is now defunct and the software is owned by big blue, IBM. They have rolled this software into Lotus calling it the Lotus Forms Viewer.

    Interesting software, but alas, it is windows only. After many emails to IBM, they finally responded. There will be no Lotus Forms Viewer for the Mac, ever. I was dismayed, until I found this blog. That is actually where I got my first idea to write a viewer for the mac, or at least found a lot of good info.

    XFDL files are both gzip'd and 64-base encoded files. Once you get the actual data out of the file, all you are left with is a very long XML file that is poorly documented and has even worse formatting. Working though the sheer volume of information (of which about 20% is useless) is a daunting task.

    However, I have decided to revisit my once abandoned project even though my original work has long since been deleted. My progress for one days work was actually very good, considering that I am once again trying to use RealBasic. Here is where I am at:

    I know it doesn't look like much at the moment, but it is a start. I can load the XML data and save it back to the original file without corruption. This is an important step. The viewer itself is worthless if you can't make any changes to the file.

    I have also cracked the issue with multiple windows overwriting each other. As with most things, its that one small piece of information that will determine success or failure.

    What makes XFDL so good is that you can securely digitally sign them. Well, as securely as anything these days. You can also attach other files, other than XFDL files, to the XFDL file. You can add PDF's, Images or whatever you want. It really is a good file system for the work I do, but alas, it is only for windows, for now.

    Of course, the beauty of using RealBasic is that I should be able to create a Linux version fairly easily. Really, there should be little to no modification of source code. This of course will have to be tested, but it should work. Scary word, should.

    Anyway, that is my progress so far.

    Until next time...