Possibly 2 things!

1. Wrong Driver (solution Download the driver in the internet www.hp.com)

2. Cable problem
a. the cable from printer is sometimes loose
b. change the cable