Hi,

As I said, I only modify code snippets to get to do what I needed. Improvements that you can get will be welcome.
I only tested on a Brother multifunction printer, so If anyone can test on othre devices and check if it works it will be great.