Welcome to HP support community.
Did you make a copy and check if that prints fine?
Meanwhile:
Run a Print Quality Diagnostic report
On the printer, touch Settings, touch Tools, and then touch Print Quality Report.
If that does not print in black:
Check the ink cartridge vents
Open the ink cartridge access door.
Press the tab on the front of the ink cartridge to release it, and then pull it out of the slot.
Examine the vent area on the top of the ink cartridge.
If the vent is clogged, use a pin to gently remove excess adhesive from the vent.
Clogged ventGently remove excess adhesive from the vent
Unclogged vent
Make sure the orange pull tab is completely removed.
Insert the ink cartridge into its slot. Press down until it snaps into place.
Repeat these steps for any other ink cartridges with defects on the report.
After reinserting all the ink cartridges, run your finger along the top of the ink cartridges. If any are protruding, press down firmly until each ink cartridge snaps into place.
You can refer this HP document for more assistance:- Click here
Let me know how it goes.
To thank me for my efforts to help you, please mark my post as an accepted solution so that it benefits several others.
Cheers.