The scans are rotated by 180 degrees and/or the length is not correct

The scanner is not connected to a USB 2.0 interface, but to USB 1.1. This means that data is lost when scanning.

Connect the scanner to a USB 2.0 socket.