That's a good tutorial. Kasyan created many great scripts.
There's also a commercial product - Output Factory - that can do this (among other things) with many various options. (Disclosure: I'm the developer.) InDesign output automation | Output Factory