Load A4-size plain paper in the printer.
Select System Preferences from the Apple 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.