Yes, you are correct. If you can print a self-test page from the printer, but can't print a document, it is a communication problem.
This can be caused by USB cord, anti-virus, firewall, or driver corruption.
Try to run the print and scan doctor and check the results.
http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&dlc=en&docname=c03275041
You can also try to disable your anti-virus and firewall.