I understand your HP Officejet 5740 is not functioning properly, and I'd like to try to help!:)
As I read your post, you mentioned that test pages will not print, which is first concerning as this points out a hardware problem. The hardware issue will need to be dealt with first and resolved before any software troubleshooting can be done.
I would suggest a power reset to start with and then try making a couple of copies after the printer starts back up.
Press the Power button to turn on the product. With the product turned on, disconnect the power cord from the rear of the product. Unplug the power cord from the wall outlet. Wait at least 15 seconds. Plug the power cord back into the wall outlet. Reconnect the power cord to the rear of the product. If the product does not turn on by itself, press the Power button to turn it on.
Please let me know if the copies work and we will go from there:)