You are viewing a single comment's thread from:

RE: Everyone needs to know JavaScript

in LeoFinance4 years ago (edited)

Back in the nineties, I got semi-good at JavaScript when I was building websites for a graphic design company where I worked. Changed jobs and had no need for it for about two decades.

Then a couple of years ago at my last paycheck job before my retirement my vestigial skills came in handy. I was working at a health insurance company. The folks in the mailroom down the hall would periodically get sent a one-page PDF (“File X”) that had to be mailed to thousands of people. They’d have thousands of them printed and then on the blank backside hand-affix address labels, run the sheets though a folding machine, and put them in address-window envelopes for mailing. Easily thousands of Avery label sheets (30 addresses per sheet) of manual labor a week.

I got wind of what they were doing and knew that there had to be a better way. Went online and found a snippet of JavaScript that I could modify so that they could use it to build a large PDF file where all of the odd-numbered pages were File X and all of the even-numbered pages had one address from an Excel file with the address in the correct position for the envelope widow. They could then do a double-sided print run.

They looked at me like I’d stepped down from the cross.

Posted Using LeoFinance Beta

Sort:  

That's such a great story!

It never occurred to me that you could do a mail merge with JS. What about just getting the pages offset printed, and then run them through a mail merge in something like Word or Libre Office, feeding the paper through the printer with the backside up?

Sure, there are probably many ways to have fixed their problem. But I knew Acrobat Pro well and remembered enough JavaScript to kludge a fix.

Likely not the most elegant solution, but way better than what they were doing before.