Also, in continuance to what GRoberts said, you can use two hole pins to align the flange. The pins are made to fit different size holes (you can also get step pins). Place a level on top of the pins to level the flange to the pipe which is also leveled.
Chris