Have you tried aligning the printer?
Here are the instructions according to the HP user manual:
To align printer from the printer display:
1. From the Home screen, touch the Settings icon, and then touch Tools.
2. On the Tools menu, touch the down arrow to scroll through the options, and then touch Align Printer.
3. Follow the instruction on the screen.
To align printer from the printer software:
a. From the Start menu on your computer, click All Programs, click HP.
b. Click the HP Photosmart 5520 series folder, click HP Photosmart 5520 series.
c. Under Print, double-click Maintain Your Printer.
d. Under the Device Services tab, double-click Align Printheads.
a. Open HP Utility
b. click Align and then click Align again.