I don't know much about SIO (yet...) but looking at the code - current implementation uses a "timer" to check if the printing has finished (ie. it will let you download the pdf if certain time has passed since last SIO activity/print). So I'd guess there's no "universal" way of detecting that via SIO state (as I guess SIO is either active or idle).
I'll try playing with buttons and see if it works... Not pretty (IMHO) but might work. As for commands - that won't be easy either... People can print from spartados, from basic etc. You'd need to implement that everywhere...