Monday, 29 August 2022

My First Solution - DOS Printer

When you work in big corporate and companies with a stash full of cash reserves, its easy to upgrade technologies. The decade from 2000 to 2010 brought in a deluge of tech updates to the Indian markets.

My father's firm was a micro business at the time striving hard to stay up-to-date in the ever-changing markets. One problem with micro businesses is that they are always cash crunched. This means, its really hard to put in money to upgrade technology all the time. At the time when there were flashy desktops and laser printers available in the market, they were still dealing with Windows 98 licenses unable to upgrade to XP or Vista (yes, this was a long time ago....)

The major hurdle in the upgrade was that their software was completely written in DOS from the 90's decade and needed printing outputs to a DOT-Matrix. And whatever reason, the upgrade support on the software had expired long back, so moving it to newer Windows versions ended up being a headache.

The Problem

The firm's data entry software was completely written in DBASE III. There was another effort going on to upgrade to a newer desktop solution, but that needed at least a couple of years till deployment. In the mean time, they needed a solution that could run the software in Windows XP and the work continue unhampered.

When Microsoft shifted to Windows XP and newer windows, the MS-DOS back bone of the operating systems were migrated to a virtual machine. This was a powerful move that really opened up the operating system to many powerful improvements. However, it worked negatively for them since, the printing support for the software was completely messed up. It took a long time for print spooling to complete. Even after adjusting the print spool settings, the font was still messed up and the original printing formats were no longer retained.

The Requirements
  1. DBASE III work in fullscreen mode
  2. Software functionality is unaffected
  3. Software should print reports with original formatting intact.

What did not work...

When I tried running a DOS software, it worked pretty nicely in Windows XP directly. The printing was not good though.

The next thought for me to hack this up was to use DosBox. 
DOSBox is a DOS Emulator that actually runs most of the DOS applications. I knew this one from the gaming world. 

The software worked fantastic in DOSBox. However, DOSBox had limited printing support at the time which did not work well with DBASE III. In fact I just got garbled text on my first attempt. Even after some spooling adjustments in Windows, the printouts were not up to the mark.

The Hacked up solution

I guess it all came down to the print support. So I decided to hack up a solution that will work for them without use of complicated emulators.

After days of fiddling with Visual Studio and C++, I found a way to capture the print device, spool it with MSDOS formatting and get it to print directly to the printer or as PDF.


They used this solution for about 2 years till their upgraded software was commissioned and put into production. 
Success Quote - "Works brilliantly, without any fiddling or complicated settings"

I know this may not be a great solution but it holds a special place for me since it was the first full-fledged completely working, solution I have ever delivered. My journey for solutions & products started here. So I thought I would just pen it down.

DISCLAIMER:
This solution is not for sale and only used internally by the firm in question.
As of today, there are other solutions like DOSPrn, etc. available which do a much better job.



No comments:

Post a Comment

My First Solution - DOS Printer

When you work in big corporate and companies with a stash full of cash reserves, its easy to upgrade technologies. The decade from 2000 to 2...