Are you using a fairly long USB cable? This sort of sounds like a flakey connection if it has a connection to the printer ... then loses it.
You might also try printing wirelessly. If you haven't done so, with printer connected via USB, run the "Canon IJ Network Tool". This utility lets you configure the printer so it can join your wifi network. Once completed, you can disconnect the USB cable.