Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
What kind of printer did it come from? If it was one of those desktop printers that one connects to a computer it is almost certainly a stepper motor.
In this case its not a question of what voltage to connect it to but rather you have to connect it to a suitable stepper motor driver. Maybe too complicated for your requirements.
You can tell if there are at least 3 wires, usually 4 or more, coming from the motor.
I've never seen a motor inside a printer that is not a stepper. Stepper motors usually have four to six wires. Most newer printers have the four wire bipolar stepper motor, because they have the most power in the space they take up. Older printers tend to have six wire unipolar motors because they are a bit easier to drive, since they do not require an H-bridge.
You can google for the article "Jones on Stepping Motors", it should help you learn how these motors work.
If you happen to have a copy of "Building Robot Drive Trains" it has a very nice chapter on how to determine what type your motor is, which wires are which, and how to drive it.