Hello
Make sure the printer is connected directly to a wall outlet, don't use a power hub or a surge protector.
I would suggest running a cleaning and printhead alignment.
Try printing a standalone self test to see if it is a hardware issue or software related.
Please provide the following information so I can assist you better.
What is the full name and product number of your printer?
How is the printer connected? (usb/ethernet/wireless)
Are you using Genuine HP Cartridges?
Check the date on the cartridges to make sure they are still in warranty. (not old stock)
What are the ink levels?