Load four or more sheets of A4-size plain paper in the printer.
Select System Preferences from the menu > Printers & Scanners (or Print & Scan, Print & Fax), and then select the printer.
Click Options & Supplies > Utility > Open Printer Utility.
Click Print Head Alignment.
Follow the on-screen instructions.