I don't know much (actually - I know nothing) about Distiller however.... If you are automating an exe then you are running out of process code i.e. asynchronous, in it's own thread. As such you are a bit stuck. Looping is no problem since Distiller is merrily running in it's own thread. It is stopping the loop at the right time that is the tricky bit.
Do you know if Distiller expose a property or (ideally) an event you can test\ trap for the printing completing? If not then I guess you are looking at some API call to read the print status.