ALWAYS off the car, paint it on the car and it will look fine until something flexes, and then it will all start to crack, and peel etc etc
Painting it off the car also means the rivet holes get painted and will help to stop them rusting, get some waxoil to squirt in the rivet holes before re-assembling aswell