From Youtube
You see, in 1876, Edison patented a device which he called a Stencil-Pen. While the first iteration of this device used a rotary drive, a patent filed the following year would almost pass for a modern tattoo machine and it was intended for making stencils. A pair of coils would drive a needle up and down at a rate of up to 50 cycles per second and the user would write or draw with the needle in order to punch a series of tiny holes in heavy paper.