Optical encoder - printer

Hello,
I'm trying to figure out the ports on the encoder (vcc, ground, output A and B) but I can't get behind it due to the rather hidden pcb.

Pictures

If anyone can figure out this mess I would greatly appreciate it.

Connect your multimeter to two of the pins, turn it, and see what happens. Repeat with other pin pairs until you figure the thing out.

True, totally forgot the most simple thing to do ^^
But then I still don't know which is the output