Before you connect any device to a new library go to the Devices tab of the the preferences panel via Edit > Preferences (Windows) or iTunes > Preferences (Mac) and ensure the box next to Prevent iPods, iPhones, and iPads from syncing automatically is ticked. You can now safely connect the device to your computer without the danger of media being automatically deleted or overwritten.
To get all your content off your connect your iPad to your new computer.
Then use a 3rd party piece of software to transfer your content
I have found Senuti useful but there are others listed in the article I linked to in a previous post.
That will let you transfer your non purchased content
For Purchased content log in to iTunes on the new computer
In Itunes Store click on Purchased under the Quick Links section on the right.
Download any music by clicking on the cloud button