As you can see, the camera is attached to the Joby Gorillapod tripod and the flexible legs of the Gorillapod are manuevered to hold the camera in position over the image. It did take a bit of experimentation to find the best way to adjust the legs. I found that two legs on top helped position the camera and one leg flexed to the underside of the ledge helped counter-balance the camera weight.
I also tried the regular Joby tripod screw mount and the adjustable smartphone mount. The smarthphone mount gave a little extra reach to the camera and made it easier to adjust.
Hope this helps! Have you tried a similar setup with your digital camera or smartphone to photograph microfilm images?