Welcome to HP Forums, this is a great place to get support, find answers and tips.
Thank you for posting your query, I'll be more than glad to help you.
I understand that you are unable to print from your HP Deskjet Ink Advantage 1515 All-in-One Printer and it shows that it is in an error state.
This issue depends on the error state of the printer.
Let's go through a few steps to troubleshoot this issue.
Please follow the step by step guide to reset the printer:
1.Turn the printer on, if it is not already on.
2.Wait until the printer is idle and silent before you continue.
3.With the printer turned on, disconnect the power cord from the rear of the printer.
4.Unplug the power cord from the wall outlet.
5.Wait at least 60 seconds.
6.Plug the power cord back into the wall outlet.
NOTE: HP recommends connecting the printer power cord directly to the wall outlet.
7.Reconnect the power cord to the rear of the printer.
8.Turn on the printer, if it does not automatically turn on. The printer might go through a warm-up period. The printer lights might flash, and the carriage might move.
9.Wait until the warm-up period finishes and your printer is idle and silent before you proceed.
If the issue persists, then you may follow the step in the link: Blinking lights