Thank you for visiting Apple Support Communities.
Here are steps that I would recommend going through when receiving error 40.
Check for hardware issues
Related errors: 1, 3, 10, 11, 12, 13, 14, 16, 20, 21, 23, 26, 27, 28, 29, 34, 35, 36, 37, 40, 1000, 1002, 1004, 1011, 1012, 1014, 1667, or 1669.
Try to restore your iOS device two more times while connected with a cable, computer, and network you know are good. Also, confirm your security software and settings are allowing communication between your device and update servers. If you still see the error message when you update or restore, contact Apple support.
Thanks for that, but i already followed all those links to no avail. As i mentioned, i don't have any security software on my mac, so doubt that is the problem. also, this is not a jailbreaked ipad.
I have also tried at least ten times to restore the ipad, using different computers.
any ideas what to do next?