Pages

Sunday, June 10, 2012

Rethinking XFDL

    As many of you know, I not only have a MacBook Pro, I also work with XFDL files. As so many people do, I usually work on these files at work on a MicroSoft Windows based PC. I also have a venerable version of the IBM Forms Viewer for osX, but the last time that was updated was in 2006. Many of the newer forms, and incompatibility issues with newer versions of Apple's operating system, crash the aged program. So, I started working on this problem myself.

    Most people would not consider this an issue. Why? Most people have a PC. I read a report in the news paper "Army Times" a couple of years ago that stated that somewhere in the neighborhood of fifteen percent of Soldiers in the United Stated Army use a Mac, and nearly five percent use some form of Linux. After doing some further checking for information, which was not easy to find, I found the numbers to be roughly the same for government employees across all departments.

    It started as a hobby project that has since become sort of an mild obsession. Throughout the course of this endeavor I have often asked, what can be done to improve the state of XFDL viewer software for Mac and Linux Users? I have had to make some fairly basic decisions that would impact the "Viewer" as a whole.

Current State of Viewer


    First, I decided to remove the "ToolBar". That is the part that has cool things like "Next Page" button and usually some sort of logo or graphic. After digging though literally millions of lines of XML data that spanned more "Forms" than I can count, I realized that these "Button" have no effect on the actual document at all. None. Except one.

    There is a button for some forms called "Wizard". This button gives you a short cut way to fill out forms. While I really like the idea, including that function at the projects current state just isn't feasible. I am still dealing with document compatibility that results from poorly formatted XML data. So what does all that mean? It means, for now anyway, no "Wizard" function for filling out forms.

    So, I dropped the toolbar along with everything that entails. So now what? Doing more research I realized that on a PC, and even in the older Mac version, each page is rendered as it gets displayed. I am sure this is so that the "Web Plugin" can function. Yes, even the browser plugin is for windows only.

    Now, however, my program renders all of the pages at once. The load time for a very large document, such as form DA705 (PT Card) takes less than 2 seconds longer, but there is no waiting as you move from page to page. Transitions are now seamless and instant.

    That still wasn't good enough. When I started, I intended to make a "clone" of the IBM version of the software. As the project has progressed, I have decided to make changes as to how the pages are presented to the user. I stopped thinking like a PC user (old habit die hard) and started to think of what it should look like on a Mac. So I chose to do this:

Smooth Scrolling between pages

    Yes, you can now scroll though the entire document just like any Real Word Processor or other document editor, as it should be. I also plan to add a panel on the left (user selectable for left/right) that will display thumbnail of each page similar to the way the "Preview" application on osX works. This will also (hopefully) show you the previews of any "attached" documents, or at least provided a means to access them. However, that feature is still probably a few months away.

    So what about Linux? No, I haven't forgotten about Linux. While writing this for Apple users is my priority, I am still working on the Linux version as well. The main issue between the two OS's is the "SpecialFolders" options that I use for temporary data. A small change in either linux code or the osX code causes the other to experience "nullException". So roughly speaking, about every ten or eleven build attempts I update the Linux code, just to make sure it still works on both systems. I had it working on Ubuntu 11.10 just last night. However, I made a change to increase the efficiency of the way the viewer handles compressed data. So, of course, the Linux build is broken again.

    So here is a breakdown of my progress so far:

  • Rendering of pages: 100%
  • Render all types of controls on pages: 60%
  • Saving changes to pages: 40%
  • Support Digital Signaturs: 0% (its coming I promise)
  • Support for printing: 0% (haven't started yet)
  • Finalizing application layout: 90%
    So far I am very happy with the progress I have made. It has been a lot of work and a lot of research. but that is where I am at so far. I could probably get this to a real beta version in around a two months provided I didn't have a full-time job. But I do. So it will still be some time before this is ready for its "Public debut". 

    Until next time ...

3 comments:

  1. Yes I use Fedora Linux and would be interested in this as well.
    Sure if he put it at http://sourceforge.net/ or http://github.com/ I'm sure he could find an audience. Hopefully he'd use gpl or lgpl .

    ReplyDelete
  2. Thanks for the replies.

    I haven't really thought about licensing at this point to be honest. Lately this project has had to take a back seat to more pressing matters. I will get back to it, probably over the holidays as work always slows down during that time.

    One thing I have done, for the best in the long run, is to start over using what I have learned. Once I was able to really into the project and see what really needed to get done, it was clear that there was no way to bring the current project up to speed. Most of the original code was hand jammed and I corrected errors and issues as I came across them. The code is horrible to look at.

    I have finally cracked the digital signature issue (for the most part). One of the reasons I haven't released the source is because during early testing I discovered I could edit not only signed documents but I could also play with signatures. Basically I could forge a document. Knowing this I have reservations about releasing the source code.

    -Chris

    ReplyDelete
  3. Any progress on this? I could really use a Lotus equivalent on my Ubuntu.

    ReplyDelete