Tell us about it!

  • NABDad
    link
    fedilink
    English
    arrow-up
    7
    ·
    10 days ago

    Many years ago I wrote a program that accepted DECWriter print jobs, parsed the escape sequences, and output them as PostScript.

    We had an application that ran on an OpenVMS system. The application could only support DEC printers, so we couldn’t use any modern devices. The DEC printers were no longer made so all our printers were either purchased refurbished, or Frankenstein printers one of our guys assembled from the carcasses of dead printers.

    My program could be used as a print filter in a Linux LPT queue. This allowed us to replace DEC printers with any printer that could natively support PostScript and any printer that had ghostscript support.

    When I first started in the job, my predecessor told me about the issue with the printers and it seemed like an interesting project.

    First test was to ensure I could convert barcodes in the print jobs. The print jobs for the DEC printers sent the barcodes as SIXEL graphics. SIXEL graphics were bitmaps sent as rows of six vertical pixels.

    Once I verified that could work, it was just a matter of writing the parser for all the rest of the escape sequences that controlled the formatting. That and learning how to produce the PostScript.

    At the time I asked my boss if he wanted me to implement it, but he said we were going to migrate to a new system very soon, so it wasn’t worth the effort.

    I still thought it was an interesting project, so I kept working on it on my own.

    Several years passed, and we were still using the old system. The man who maintained our printers died, which led to a problem. Without him to maintain the printers, they started failing faster than we could replace them. In a meeting to discuss how we would respond printer issue, I mentioned that I had continued working on my filter at home and I only needed a a few weeks of focused effort to get a functional print filter. This time my boss told me to proceed.

    We very quickly replaced all our old DEC impact printers with modern laser printers.

    We had some forms on tractor feed paper, so I converted the forms to PostScript and added that to the filter. I was also able to get it working with Zebra label printers.

    I had a problem with the barcodes. My script generated perfect barcodes, but our barcode pens couldn’t scan them. After looking at the barcodes that the DEC printers made and comparing them to what my filter produced, the only difference I could see was that the DEC barcodes looked like crap. Jittery dots instead of perfect, straight lines. So I modified my script to make the graphics produced look just a little bit worse, and they started working.

    That print filter continued working flawlessly in production for several more years until we finally managed to migrate to the new system.